Merge from TASVideo
This commit is contained in:
commit
f70a2c8c6c
|
@ -257,3 +257,5 @@
|
||||||
.hgignore
|
.hgignore
|
||||||
.hgtags
|
.hgtags
|
||||||
/output/*.manifest
|
/output/*.manifest
|
||||||
|
/output/dll/*.iobj
|
||||||
|
/output/dll/*.ipdb
|
||||||
|
|
|
@ -47,9 +47,10 @@ namespace BizHawk.Client.Common
|
||||||
public static BinaryStateLump ClientSettings { get; private set; }
|
public static BinaryStateLump ClientSettings { get; private set; }
|
||||||
[Name("VerificationLog", "txt")]
|
[Name("VerificationLog", "txt")]
|
||||||
public static BinaryStateLump VerificationLog { get; private set; }
|
public static BinaryStateLump VerificationLog { get; private set; }
|
||||||
|
|
||||||
[Name("UserData", "txt")]
|
[Name("UserData", "txt")]
|
||||||
public static BinaryStateLump UserData { get; private set; }
|
public static BinaryStateLump UserData { get; private set; }
|
||||||
|
[Name("Session", "txt")]
|
||||||
|
public static BinaryStateLump Session { get; private set; }
|
||||||
|
|
||||||
// branchstuff
|
// branchstuff
|
||||||
[Name("Branches\\CoreData", "bin")]
|
[Name("Branches\\CoreData", "bin")]
|
||||||
|
@ -64,6 +65,8 @@ namespace BizHawk.Client.Common
|
||||||
public static BinaryStateLump BranchHeader { get; private set; }
|
public static BinaryStateLump BranchHeader { get; private set; }
|
||||||
[Name("Branches\\Markers", "txt")]
|
[Name("Branches\\Markers", "txt")]
|
||||||
public static BinaryStateLump BranchMarkers { get; private set; }
|
public static BinaryStateLump BranchMarkers { get; private set; }
|
||||||
|
[Name("Branches\\GreenZone")]
|
||||||
|
public static BinaryStateLump BranchStateHistory { get; private set; }
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Property)]
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
private class NameAttribute : Attribute
|
private class NameAttribute : Attribute
|
||||||
|
|
|
@ -52,7 +52,6 @@
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
@ -113,9 +112,6 @@
|
||||||
<Compile Include="CoreFileProvider.cs" />
|
<Compile Include="CoreFileProvider.cs" />
|
||||||
<Compile Include="ExceptionClasses.cs" />
|
<Compile Include="ExceptionClasses.cs" />
|
||||||
<Compile Include="FirmwareManager.cs" />
|
<Compile Include="FirmwareManager.cs" />
|
||||||
<Compile Include="GLManager.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Global.cs" />
|
<Compile Include="Global.cs" />
|
||||||
<Compile Include="inputAdapters\AutoPattern.cs" />
|
<Compile Include="inputAdapters\AutoPattern.cs" />
|
||||||
<Compile Include="inputAdapters\BitwiseAdapters.cs" />
|
<Compile Include="inputAdapters\BitwiseAdapters.cs" />
|
||||||
|
@ -158,6 +154,7 @@
|
||||||
<Compile Include="movie\bk2\Bk2Movie.HeaderApi.cs">
|
<Compile Include="movie\bk2\Bk2Movie.HeaderApi.cs">
|
||||||
<DependentUpon>Bk2Movie.cs</DependentUpon>
|
<DependentUpon>Bk2Movie.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="movie\import\PXMImport.cs" />
|
||||||
<Compile Include="movie\tasproj\StateManagerState.cs" />
|
<Compile Include="movie\tasproj\StateManagerState.cs" />
|
||||||
<Compile Include="movie\tasproj\TasBranch.cs" />
|
<Compile Include="movie\tasproj\TasBranch.cs" />
|
||||||
<Compile Include="movie\tasproj\TasMovie.History.cs" />
|
<Compile Include="movie\tasproj\TasMovie.History.cs" />
|
||||||
|
@ -212,6 +209,7 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="movie\tasproj\TasMovie.cs" />
|
<Compile Include="movie\tasproj\TasMovie.cs" />
|
||||||
<Compile Include="movie\tasproj\TasMovieMarker.cs" />
|
<Compile Include="movie\tasproj\TasMovieMarker.cs" />
|
||||||
|
<Compile Include="movie\tasproj\TasSession.cs" />
|
||||||
<Compile Include="movie\tasproj\TasStateManager.cs" />
|
<Compile Include="movie\tasproj\TasStateManager.cs" />
|
||||||
<Compile Include="movie\tasproj\TasMovieRecord.cs" />
|
<Compile Include="movie\tasproj\TasMovieRecord.cs" />
|
||||||
<Compile Include="movie\tasproj\TasStateManagerSettings.cs" />
|
<Compile Include="movie\tasproj\TasStateManagerSettings.cs" />
|
||||||
|
@ -231,12 +229,12 @@
|
||||||
<Compile Include="SevenZipWriter.cs" />
|
<Compile Include="SevenZipWriter.cs" />
|
||||||
<Compile Include="SharpZipWriter.cs" />
|
<Compile Include="SharpZipWriter.cs" />
|
||||||
<Compile Include="SystemInfo.cs" />
|
<Compile Include="SystemInfo.cs" />
|
||||||
|
<Compile Include="TempFileCleaner.cs" />
|
||||||
<Compile Include="tools\Cheat.cs" />
|
<Compile Include="tools\Cheat.cs" />
|
||||||
<Compile Include="tools\CheatList.cs" />
|
<Compile Include="tools\CheatList.cs" />
|
||||||
<Compile Include="tools\RamSearchEngine.cs" />
|
<Compile Include="tools\RamSearchEngine.cs" />
|
||||||
<Compile Include="tools\Watch.cs" />
|
<Compile Include="tools\Watch.cs" />
|
||||||
<Compile Include="tools\WatchList.cs" />
|
<Compile Include="tools\WatchList.cs" />
|
||||||
<Compile Include="UIHelper.cs" />
|
|
||||||
<Compile Include="XmlGame.cs" />
|
<Compile Include="XmlGame.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
public class RomLoader
|
public class RomLoader
|
||||||
{
|
{
|
||||||
public enum LoadErrorType { Unknown, MissingFirmware, XML }
|
public enum LoadErrorType { Unknown, MissingFirmware, XML, DiscError }
|
||||||
|
|
||||||
// helper methods for the settings events
|
// helper methods for the settings events
|
||||||
private object GetCoreSettings<T>()
|
private object GetCoreSettings<T>()
|
||||||
|
@ -265,7 +265,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
if (discMountJob.OUT_SlowLoadAborted)
|
if (discMountJob.OUT_SlowLoadAborted)
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk");
|
DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", "", LoadErrorType.DiscError);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
if (discMountJob.OUT_SlowLoadAborted)
|
if (discMountJob.OUT_SlowLoadAborted)
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk");
|
DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", "", LoadErrorType.DiscError);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
if (discMountJob.OUT_SlowLoadAborted)
|
if (discMountJob.OUT_SlowLoadAborted)
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk");
|
DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", "PSX", LoadErrorType.DiscError);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
// need to get rid of this hack at some point
|
// need to get rid of this hack at some point
|
||||||
rom = new RomGame(file);
|
rom = new RomGame(file);
|
||||||
((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", String.Empty)); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename
|
((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", string.Empty)); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename
|
||||||
byte[] romData = null;
|
byte[] romData = null;
|
||||||
byte[] xmlData = rom.FileData;
|
byte[] xmlData = rom.FileData;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.Common
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Starts a thread which cleans any filenames in %temp% beginning with bizhawk.bizdelete.
|
||||||
|
/// Files shouldn't be named that unless they're safe to delete, but notably, they may stil be in use. That won't hurt this component.
|
||||||
|
/// When they're no longer in use, this component will then be able to delete them.
|
||||||
|
/// </summary>
|
||||||
|
public static class TempFileCleaner
|
||||||
|
{
|
||||||
|
//todo - manage paths other than %temp%, make not static, or allow adding multiple paths to static instance
|
||||||
|
|
||||||
|
public static void Start()
|
||||||
|
{
|
||||||
|
lock (typeof(TempFileCleaner))
|
||||||
|
{
|
||||||
|
if (thread != null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
thread = new System.Threading.Thread(ThreadProc);
|
||||||
|
thread.IsBackground = true;
|
||||||
|
thread.Priority = System.Threading.ThreadPriority.Lowest;
|
||||||
|
thread.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ThreadProc()
|
||||||
|
{
|
||||||
|
var di = new DirectoryInfo(Path.GetTempPath());
|
||||||
|
for (; ; )
|
||||||
|
{
|
||||||
|
var fis = di.GetFiles("bizhawk.bizdelete*");
|
||||||
|
foreach (var fi in fis)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
fi.Delete();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//try not to do more than one thing per frame
|
||||||
|
System.Threading.Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
//try not to slam the filesystem too hard, we dont want this to cause any hiccups
|
||||||
|
System.Threading.Thread.Sleep(5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Stop()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static System.Threading.Thread thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -116,7 +116,11 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public enum ESoundOutputMethod { DirectSound, XAudio2, OpenAL, Dummy };
|
public enum ESoundOutputMethod { DirectSound, XAudio2, OpenAL, Dummy };
|
||||||
|
|
||||||
public enum EDispManagerAR { None, System, Custom };
|
public enum EDispManagerAR { None, System,
|
||||||
|
//actually, custom SIZE (fixme on major release)
|
||||||
|
Custom,
|
||||||
|
CustomRatio
|
||||||
|
};
|
||||||
|
|
||||||
public enum SaveStateTypeE { Default, Binary, Text };
|
public enum SaveStateTypeE { Default, Binary, Text };
|
||||||
|
|
||||||
|
@ -274,8 +278,13 @@ namespace BizHawk.Client.Common
|
||||||
public bool DispChrome_AllowDoubleClickFullscreen = true;
|
public bool DispChrome_AllowDoubleClickFullscreen = true;
|
||||||
|
|
||||||
public EDispManagerAR DispManagerAR = EDispManagerAR.System;
|
public EDispManagerAR DispManagerAR = EDispManagerAR.System;
|
||||||
public int DispCustomUserARWidth = 1;
|
|
||||||
public int DispCustomUserARHeight = 1;
|
//these are misnomers. they're actually a fixed size (fixme on major release)
|
||||||
|
public int DispCustomUserARWidth = -1;
|
||||||
|
public int DispCustomUserARHeight = -1;
|
||||||
|
//these are more like the actual AR ratio (i.e. 4:3) (fixme on major release)
|
||||||
|
public float DispCustomUserARX = -1;
|
||||||
|
public float DispCustomUserARY = -1;
|
||||||
|
|
||||||
// Sound options
|
// Sound options
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
|
|
|
@ -9,8 +9,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
Name = string.Empty;
|
Name = string.Empty;
|
||||||
Path = path;
|
Path = path;
|
||||||
Enabled = true;
|
State = RunState.Running;
|
||||||
Paused = false;
|
|
||||||
FrameWaiting = false;
|
FrameWaiting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,28 +28,34 @@ namespace BizHawk.Client.Common
|
||||||
IsSeparator = isSeparator;
|
IsSeparator = isSeparator;
|
||||||
Name = string.Empty;
|
Name = string.Empty;
|
||||||
Path = string.Empty;
|
Path = string.Empty;
|
||||||
Enabled = false;
|
State = RunState.Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LuaFile(LuaFile file)
|
public LuaFile(LuaFile file)
|
||||||
{
|
{
|
||||||
Name = file.Name;
|
Name = file.Name;
|
||||||
Path = file.Path;
|
Path = file.Path;
|
||||||
Enabled = file.Enabled;
|
State = file.State;
|
||||||
Paused = file.Paused;
|
|
||||||
IsSeparator = file.IsSeparator;
|
IsSeparator = file.IsSeparator;
|
||||||
CurrentDirectory = file.CurrentDirectory;
|
CurrentDirectory = file.CurrentDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get { return State != RunState.Disabled; } }
|
||||||
public bool Paused { get; set; }
|
public bool Paused { get { return State == RunState.Paused; } }
|
||||||
public bool IsSeparator { get; set; }
|
public bool IsSeparator { get; set; }
|
||||||
public LuaInterface.Lua Thread { get; set; }
|
public LuaInterface.Lua Thread { get; set; }
|
||||||
public bool FrameWaiting { get; set; }
|
public bool FrameWaiting { get; set; }
|
||||||
public string CurrentDirectory { get; set; }
|
public string CurrentDirectory { get; set; }
|
||||||
|
|
||||||
|
public enum RunState
|
||||||
|
{
|
||||||
|
Disabled, Running, Paused
|
||||||
|
}
|
||||||
|
|
||||||
|
public RunState State { get; set; }
|
||||||
|
|
||||||
public static LuaFile SeparatorInstance
|
public static LuaFile SeparatorInstance
|
||||||
{
|
{
|
||||||
get { return new LuaFile(true); }
|
get { return new LuaFile(true); }
|
||||||
|
@ -58,22 +63,25 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
Enabled = false;
|
State = RunState.Disabled;
|
||||||
Thread = null;
|
Thread = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Toggle()
|
public void Toggle()
|
||||||
{
|
{
|
||||||
Enabled ^= true;
|
if (State == RunState.Paused)
|
||||||
if (Enabled)
|
State = RunState.Running;
|
||||||
{
|
else if (State == RunState.Disabled)
|
||||||
Paused = false;
|
State = RunState.Running;
|
||||||
}
|
else State = RunState.Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TogglePause()
|
public void TogglePause()
|
||||||
{
|
{
|
||||||
Paused ^= true;
|
if (State == RunState.Paused)
|
||||||
|
State = RunState.Running;
|
||||||
|
else if(State == RunState.Running)
|
||||||
|
State = RunState.Paused;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public void StopAllScripts()
|
public void StopAllScripts()
|
||||||
{
|
{
|
||||||
ForEach(x => x.Enabled = false);
|
ForEach(x => x.State = LuaFile.RunState.Disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void Clear()
|
public new void Clear()
|
||||||
|
@ -105,8 +105,10 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
Add(new LuaFile(scriptPath)
|
Add(new LuaFile(scriptPath)
|
||||||
{
|
{
|
||||||
Enabled = !Global.Config.DisableLuaScriptsOnLoad &&
|
State = (
|
||||||
line.Substring(0, 1) == "1",
|
!Global.Config.DisableLuaScriptsOnLoad
|
||||||
|
&& line.Substring(0, 1) == "1"
|
||||||
|
) ? LuaFile.RunState.Running : LuaFile.RunState.Disabled
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,12 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public new bool Remove(NamedLuaFunction function)
|
public new bool Remove(NamedLuaFunction function)
|
||||||
{
|
{
|
||||||
if (Global.Emulator.CanPollInput())
|
if (Global.Emulator.InputCallbacksAvailable())
|
||||||
{
|
{
|
||||||
Global.Emulator.AsInputPollable().InputCallbacks.Remove(function.Callback);
|
Global.Emulator.AsInputPollable().InputCallbacks.Remove(function.Callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Global.Emulator.CanDebug() && Global.Emulator.MemoryCallbacksAvailable())
|
if (Global.Emulator.MemoryCallbacksAvailable())
|
||||||
{
|
{
|
||||||
Global.Emulator.AsDebuggable().MemoryCallbacks.Remove(function.Callback);
|
Global.Emulator.AsDebuggable().MemoryCallbacks.Remove(function.Callback);
|
||||||
}
|
}
|
||||||
|
@ -33,23 +33,16 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public void ClearAll()
|
public void ClearAll()
|
||||||
{
|
{
|
||||||
if (Global.Emulator.CanPollInput())
|
if (Global.Emulator.InputCallbacksAvailable())
|
||||||
{
|
{
|
||||||
Global.Emulator.AsInputPollable().InputCallbacks.RemoveAll(this.Select(x => x.Callback));
|
Global.Emulator.AsInputPollable().InputCallbacks.RemoveAll(this.Select(x => x.Callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Global.Emulator.CanDebug())
|
if (Global.Emulator.MemoryCallbacksAvailable())
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var cbSys = Global.Emulator.AsDebuggable().MemoryCallbacks;
|
var cbSys = Global.Emulator.AsDebuggable().MemoryCallbacks;
|
||||||
cbSys.RemoveAll(this.Select(x => x.Callback));
|
cbSys.RemoveAll(this.Select(x => x.Callback));
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
|
||||||
//swallow exceptions here. many cores havent implemented memorycallbacks, we ought to have more granular feature querying
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
using BizHawk.Common.BufferExtensions;
|
using BizHawk.Common.BufferExtensions;
|
||||||
|
@ -73,23 +74,72 @@ namespace BizHawk.Client.Common
|
||||||
warningMsg = string.Empty;
|
warningMsg = string.Empty;
|
||||||
string ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty;
|
string ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty;
|
||||||
|
|
||||||
// TODO: reflect off the assembly and find an IMovieImporter with the appropriate ImportExtension metadata
|
if (UsesLegacyImporter(ext))
|
||||||
//if (ext == ".FM2")
|
|
||||||
//{
|
|
||||||
// var result = new Fm2Import().Import(path);
|
|
||||||
// errorMsg = result.Errors.First();
|
|
||||||
// warningMsg = result.Errors.First();
|
|
||||||
// return result.Movie;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (ext == ".PJM")
|
|
||||||
{
|
{
|
||||||
var result = new PJMImport().Import(path);
|
return LegacyImportFile(ext, path, out errorMsg, out warningMsg).ToBk2();
|
||||||
errorMsg = result.Errors.First();
|
|
||||||
warningMsg = result.Errors.First();
|
|
||||||
return result.Movie;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var importers = ImportersForExtension(ext);
|
||||||
|
var importerType = importers.FirstOrDefault();
|
||||||
|
|
||||||
|
if (importerType == default(Type))
|
||||||
|
{
|
||||||
|
errorMsg = "No importer found for file type " + ext;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new instance of the importer class using the no-argument constructor
|
||||||
|
IMovieImport importer = importerType.GetConstructor(new Type[] { })
|
||||||
|
.Invoke(new object[] { }) as IMovieImport;
|
||||||
|
|
||||||
|
Bk2Movie movie = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = importer.Import(path);
|
||||||
|
if (result.Errors.Count() > 0) errorMsg = result.Errors.First();
|
||||||
|
if (result.Warnings.Count() > 0) warningMsg = result.Warnings.First();
|
||||||
|
movie = result.Movie;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
errorMsg = ex.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return movie;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<Type> ImportersForExtension(string ext)
|
||||||
|
{
|
||||||
|
var info = typeof(MovieImport).Module;
|
||||||
|
var importers = from t in info.GetTypes()
|
||||||
|
where typeof(IMovieImport).IsAssignableFrom(t)
|
||||||
|
&& TypeImportsExtension(t, ext)
|
||||||
|
select t;
|
||||||
|
|
||||||
|
return importers;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TypeImportsExtension(Type t, string ext)
|
||||||
|
{
|
||||||
|
var attrs = (ImportExtension[])t.GetCustomAttributes(typeof(ImportExtension), inherit: false);
|
||||||
|
|
||||||
|
if (attrs.Any(a => a.Extension.ToUpper() == ext.ToUpper()))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BkmMovie LegacyImportFile(string ext, string path, out string errorMsg, out string warningMsg)
|
||||||
|
{
|
||||||
|
errorMsg = string.Empty;
|
||||||
|
warningMsg = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
BkmMovie m = new BkmMovie();
|
BkmMovie m = new BkmMovie();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -149,16 +199,23 @@ namespace BizHawk.Client.Common
|
||||||
errorMsg = except.ToString();
|
errorMsg = except.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hack
|
return m;
|
||||||
return m.ToBk2();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return whether or not the type of file provided can currently be imported.
|
// Return whether or not the type of file provided can currently be imported.
|
||||||
public static bool IsValidMovieExtension(string extension)
|
public static bool IsValidMovieExtension(string extension)
|
||||||
|
{
|
||||||
|
// TODO: Other movie formats that don't use a legacy importer (PJM/PXM, etc),
|
||||||
|
// when those are implemented
|
||||||
|
return UsesLegacyImporter(extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return whether or not the type of file provided is currently imported by a legacy (i.e. to BKM not BK2) importer
|
||||||
|
public static bool UsesLegacyImporter(string extension)
|
||||||
{
|
{
|
||||||
string[] extensions =
|
string[] extensions =
|
||||||
{
|
{
|
||||||
"FCM", "FM2", "FMV", "GMV", "MCM", "MC2", "MMV", "NMV", "LSMV", "SMV", "VBM", "VMV", "YMV", "ZMV"
|
"BKM", "FCM", "FM2", "FMV", "GMV", "MCM", "MC2", "MMV", "NMV", "LSMV", "SMV", "VBM", "VMV", "YMV", "ZMV"
|
||||||
};
|
};
|
||||||
return extensions.Any(ext => extension.ToUpper() == "." + ext);
|
return extensions.Any(ext => extension.ToUpper() == "." + ext);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +270,7 @@ namespace BizHawk.Client.Common
|
||||||
controller = "Saturn Controller";
|
controller = "Saturn Controller";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var controllers = new SimpleController {Type = new ControllerDefinition {Name = controller}};
|
var controllers = new SimpleController { Type = new ControllerDefinition { Name = controller } };
|
||||||
// Split up the sections of the frame.
|
// Split up the sections of the frame.
|
||||||
string[] sections = line.Split('|');
|
string[] sections = line.Split('|');
|
||||||
if (ext == ".FM2" && sections.Length >= 2 && sections[1].Length != 0)
|
if (ext == ".FM2" && sections.Length >= 2 && sections[1].Length != 0)
|
||||||
|
@ -643,7 +700,7 @@ namespace BizHawk.Client.Common
|
||||||
m.Header[HeaderKeys.AUTHOR] = author;
|
m.Header[HeaderKeys.AUTHOR] = author;
|
||||||
// Advance to first byte of input data.
|
// Advance to first byte of input data.
|
||||||
r.BaseStream.Position = firstFrameOffset;
|
r.BaseStream.Position = firstFrameOffset;
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = "NES Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = "NES Controller" } };
|
||||||
string[] buttons = { "A", "B", "Select", "Start", "Up", "Down", "Left", "Right" };
|
string[] buttons = { "A", "B", "Select", "Start", "Up", "Down", "Left", "Right" };
|
||||||
bool fds = false;
|
bool fds = false;
|
||||||
bool fourscore = false;
|
bool fourscore = false;
|
||||||
|
@ -874,7 +931,7 @@ namespace BizHawk.Client.Common
|
||||||
*/
|
*/
|
||||||
m.Header[HeaderKeys.PAL] = "False";
|
m.Header[HeaderKeys.PAL] = "False";
|
||||||
// 090 frame data begins here
|
// 090 frame data begins here
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = "NES Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = "NES Controller" } };
|
||||||
/*
|
/*
|
||||||
* 01 Right
|
* 01 Right
|
||||||
* 02 Left
|
* 02 Left
|
||||||
|
@ -1378,7 +1435,7 @@ namespace BizHawk.Client.Common
|
||||||
r.ReadBytes(103);
|
r.ReadBytes(103);
|
||||||
// TODO: Verify if NTSC/"PAL" mode used for the movie can be detected or not.
|
// TODO: Verify if NTSC/"PAL" mode used for the movie can be detected or not.
|
||||||
// 100 variable Input data
|
// 100 variable Input data
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = name + " Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = name + " Controller" } };
|
||||||
int bytes = 256;
|
int bytes = 256;
|
||||||
// The input stream consists of 1 byte for power-on and reset, and then X bytes per each input port per frame.
|
// The input stream consists of 1 byte for power-on and reset, and then X bytes per each input port per frame.
|
||||||
if (platform == "nes")
|
if (platform == "nes")
|
||||||
|
@ -1499,7 +1556,7 @@ namespace BizHawk.Client.Common
|
||||||
// 00e4-00f3: binary: rom MD5 digest
|
// 00e4-00f3: binary: rom MD5 digest
|
||||||
byte[] md5 = r.ReadBytes(16);
|
byte[] md5 = r.ReadBytes(16);
|
||||||
m.Header[MD5] = string.Format("{0:x8}", md5.BytesToHexString().ToLower());
|
m.Header[MD5] = string.Format("{0:x8}", md5.BytesToHexString().ToLower());
|
||||||
var controllers = new SimpleController { Type = new ControllerDefinition { Name = "SMS Controller" }};
|
var controllers = new SimpleController { Type = new ControllerDefinition { Name = "SMS Controller" } };
|
||||||
/*
|
/*
|
||||||
76543210
|
76543210
|
||||||
* bit 0 (0x01): up
|
* bit 0 (0x01): up
|
||||||
|
@ -1724,7 +1781,7 @@ namespace BizHawk.Client.Common
|
||||||
// ... 4-byte little-endian unsigned int: length of controller data in bytes
|
// ... 4-byte little-endian unsigned int: length of controller data in bytes
|
||||||
uint length = r.ReadUInt32();
|
uint length = r.ReadUInt32();
|
||||||
// ... (variable) controller data
|
// ... (variable) controller data
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = "NES Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = "NES Controller" } };
|
||||||
/*
|
/*
|
||||||
Standard controllers store data in the following format:
|
Standard controllers store data in the following format:
|
||||||
* 01: A
|
* 01: A
|
||||||
|
@ -1827,7 +1884,7 @@ namespace BizHawk.Client.Common
|
||||||
* bit 4: controller 5 in use
|
* bit 4: controller 5 in use
|
||||||
* other: reserved, set to 0
|
* other: reserved, set to 0
|
||||||
*/
|
*/
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = "SNES Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = "SNES Controller" } };
|
||||||
bool[] controllersUsed = new bool[5];
|
bool[] controllersUsed = new bool[5];
|
||||||
for (int controller = 1; controller <= controllersUsed.Length; controller++)
|
for (int controller = 1; controller <= controllersUsed.Length; controller++)
|
||||||
{
|
{
|
||||||
|
@ -2238,7 +2295,7 @@ namespace BizHawk.Client.Common
|
||||||
string movieDescription = NullTerminated(r.ReadStringFixedAscii(128));
|
string movieDescription = NullTerminated(r.ReadStringFixedAscii(128));
|
||||||
m.Comments.Add(COMMENT + " " + movieDescription);
|
m.Comments.Add(COMMENT + " " + movieDescription);
|
||||||
r.BaseStream.Position = firstFrameOffset;
|
r.BaseStream.Position = firstFrameOffset;
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition()};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition() };
|
||||||
if (platform != "GBA")
|
if (platform != "GBA")
|
||||||
{
|
{
|
||||||
controllers.Type.Name = "Gameboy Controller";
|
controllers.Type.Name = "Gameboy Controller";
|
||||||
|
@ -2416,7 +2473,7 @@ namespace BizHawk.Client.Common
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
r.BaseStream.Position = firstFrameOffset;
|
r.BaseStream.Position = firstFrameOffset;
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = "NES Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = "NES Controller" } };
|
||||||
/*
|
/*
|
||||||
* 01 A
|
* 01 A
|
||||||
* 02 B
|
* 02 B
|
||||||
|
@ -2653,7 +2710,7 @@ namespace BizHawk.Client.Common
|
||||||
uint savestateSize = (uint)((r.ReadByte() | (r.ReadByte() << 8) | (r.ReadByte() << 16)) & 0x7FFFFF);
|
uint savestateSize = (uint)((r.ReadByte() | (r.ReadByte() << 8) | (r.ReadByte() << 16)) & 0x7FFFFF);
|
||||||
// Next follows a ZST format savestate.
|
// Next follows a ZST format savestate.
|
||||||
r.ReadBytes((int)savestateSize);
|
r.ReadBytes((int)savestateSize);
|
||||||
SimpleController controllers = new SimpleController {Type = new ControllerDefinition {Name = "SNES Controller"}};
|
SimpleController controllers = new SimpleController { Type = new ControllerDefinition { Name = "SNES Controller" } };
|
||||||
/*
|
/*
|
||||||
* bit 11: A
|
* bit 11: A
|
||||||
* bit 10: X
|
* bit 10: X
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
using System;
|
using BizHawk.Emulation.Cores.Sony.PSX;
|
||||||
using System.Collections.Generic;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
|
@ -11,7 +10,418 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
protected override void RunImport()
|
protected override void RunImport()
|
||||||
{
|
{
|
||||||
// TODO
|
Bk2Movie movie = Result.Movie;
|
||||||
|
MiscHeaderInfo info;
|
||||||
|
|
||||||
|
movie.HeaderEntries[HeaderKeys.PLATFORM] = "PSX";
|
||||||
|
|
||||||
|
using (var fs = SourceFile.OpenRead())
|
||||||
|
{
|
||||||
|
using (var br = new BinaryReader(fs))
|
||||||
|
{
|
||||||
|
info = parseHeader(movie, "PJM ", br);
|
||||||
|
|
||||||
|
fs.Seek(info.controllerDataOffset, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
if (info.binaryFormat)
|
||||||
|
{
|
||||||
|
parseBinaryInputLog(br, movie, info);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parseTextInputLog(br, movie, info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
movie.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected MiscHeaderInfo parseHeader(Bk2Movie movie, string expectedMagic, BinaryReader br)
|
||||||
|
{
|
||||||
|
var info = new MiscHeaderInfo();
|
||||||
|
|
||||||
|
string magic = new string(br.ReadChars(4));
|
||||||
|
if (magic != expectedMagic)
|
||||||
|
{
|
||||||
|
Result.Errors.Add("Not a " + expectedMagic + "file: invalid magic number in file header.");
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
UInt32 movieVersionNumber = br.ReadUInt32();
|
||||||
|
if (movieVersionNumber != 2)
|
||||||
|
{
|
||||||
|
Result.Warnings.Add(String.Format("Unexpected movie version: got {0}, expecting 2", movieVersionNumber));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 008: UInt32 emulator version.
|
||||||
|
br.ReadUInt32();
|
||||||
|
|
||||||
|
byte flags = br.ReadByte();
|
||||||
|
byte flags2 = br.ReadByte();
|
||||||
|
if ((flags & 0x02) != 0)
|
||||||
|
{
|
||||||
|
Result.Errors.Add("Movie starts from savestate; this is currently unsupported.");
|
||||||
|
}
|
||||||
|
if ((flags & 0x04) != 0)
|
||||||
|
{
|
||||||
|
movie.HeaderEntries[HeaderKeys.PAL] = "1";
|
||||||
|
}
|
||||||
|
if ((flags & 0x08) != 0)
|
||||||
|
{
|
||||||
|
Result.Errors.Add("Movie contains embedded memory cards; this is currently unsupported.");
|
||||||
|
}
|
||||||
|
if ((flags & 0x10) != 0)
|
||||||
|
{
|
||||||
|
Result.Errors.Add("Movie contains embedded cheat list; this is currently unsupported.");
|
||||||
|
}
|
||||||
|
if ((flags & 0x20) != 0 || (flags2 & 0x06) != 0)
|
||||||
|
{
|
||||||
|
Result.Errors.Add("Movie relies on emulator hacks; this is currently unsupported.");
|
||||||
|
}
|
||||||
|
if ((flags & 0x40) != 0)
|
||||||
|
{
|
||||||
|
info.binaryFormat = false;
|
||||||
|
}
|
||||||
|
if ((flags & 0x80) != 0 || (flags2 & 0x01) != 0)
|
||||||
|
{
|
||||||
|
Result.Errors.Add("Movie uses multitap; this is currently unsupported.");
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Player 1 controller type
|
||||||
|
switch (br.ReadByte())
|
||||||
|
{
|
||||||
|
// It seems to be inconsistent in the files I looked at which of these is used
|
||||||
|
// to mean no controller present.
|
||||||
|
case 0:
|
||||||
|
case 8:
|
||||||
|
info.player1Type = OctoshockDll.ePeripheralType.None;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
info.player1Type = OctoshockDll.ePeripheralType.Pad;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
info.player1Type = OctoshockDll.ePeripheralType.DualShock;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Result.Errors.Add("Movie has unrecognised controller type for Player 1.");
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Player 2 controller type
|
||||||
|
switch (br.ReadByte())
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 8:
|
||||||
|
info.player1Type = OctoshockDll.ePeripheralType.None;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
info.player1Type = OctoshockDll.ePeripheralType.Pad;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
info.player1Type = OctoshockDll.ePeripheralType.DualShock;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Result.Errors.Add("Movie has unrecognised controller type for Player 2.");
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
Octoshock.SyncSettings syncsettings = new Octoshock.SyncSettings();
|
||||||
|
syncsettings.FIOConfig.Devices8 =
|
||||||
|
new[] {
|
||||||
|
info.player1Type,
|
||||||
|
OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,
|
||||||
|
info.player2Type,
|
||||||
|
OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None
|
||||||
|
};
|
||||||
|
|
||||||
|
// Annoying kludge to force the json serializer to serialize the type name for "o" object.
|
||||||
|
// For just the "o" object to have type information, it must be cast to a superclass such
|
||||||
|
// that the TypeNameHandling.Auto decides to serialize the type as well as the object
|
||||||
|
// contents. As such, the object cast is NOT redundant
|
||||||
|
var jsonSettings = new JsonSerializerSettings
|
||||||
|
{
|
||||||
|
TypeNameHandling = TypeNameHandling.Auto
|
||||||
|
};
|
||||||
|
movie.SyncSettingsJson = JsonConvert.SerializeObject(new { o = (object)syncsettings }, jsonSettings);
|
||||||
|
|
||||||
|
info.frameCount = br.ReadUInt32();
|
||||||
|
UInt32 rerecordCount = br.ReadUInt32();
|
||||||
|
movie.HeaderEntries[HeaderKeys.RERECORDS] = rerecordCount.ToString();
|
||||||
|
|
||||||
|
// 018: UInt32 savestateOffset
|
||||||
|
// 01C: UInt32 memoryCard1Offset
|
||||||
|
// 020: UInt32 memoryCard2Offset
|
||||||
|
// 024: UInt32 cheatListOffset
|
||||||
|
|
||||||
|
// 028: UInt32 cdRomIdOffset
|
||||||
|
// Source format is just the first up-to-8 alphanumeric characters of the CD label,
|
||||||
|
// so not so useful.
|
||||||
|
|
||||||
|
br.ReadBytes(20);
|
||||||
|
|
||||||
|
info.controllerDataOffset = br.ReadUInt32();
|
||||||
|
|
||||||
|
UInt32 authorNameLength = br.ReadUInt32();
|
||||||
|
char[] authorName = br.ReadChars((int)authorNameLength);
|
||||||
|
|
||||||
|
movie.HeaderEntries[HeaderKeys.AUTHOR] = new string(authorName);
|
||||||
|
|
||||||
|
info.parseSuccessful = true;
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void parseBinaryInputLog(BinaryReader br, Bk2Movie movie, MiscHeaderInfo info)
|
||||||
|
{
|
||||||
|
Octoshock.SyncSettings settings = new Octoshock.SyncSettings();
|
||||||
|
SimpleController controllers = new SimpleController();
|
||||||
|
settings.FIOConfig.Devices8 =
|
||||||
|
new[] {
|
||||||
|
info.player1Type,
|
||||||
|
OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,
|
||||||
|
info.player2Type,
|
||||||
|
OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None
|
||||||
|
};
|
||||||
|
controllers.Type = Octoshock.CreateControllerDefinition(settings);
|
||||||
|
|
||||||
|
string[] buttons = { "Select", "L3", "R3", "Start", "Up", "Right", "Down", "Left",
|
||||||
|
"L2", "R2", "L1", "R1", "Triangle", "Circle", "Cross", "Square"};
|
||||||
|
|
||||||
|
bool isCdTrayOpen = false;
|
||||||
|
int cdNumber = 1;
|
||||||
|
|
||||||
|
for (int frame = 0; frame < info.frameCount; ++frame)
|
||||||
|
{
|
||||||
|
if (info.player1Type != OctoshockDll.ePeripheralType.None)
|
||||||
|
{
|
||||||
|
UInt16 controllerState = br.ReadUInt16();
|
||||||
|
|
||||||
|
// As L3 and R3 don't exist on a standard gamepad, handle them separately later. Unfortunately
|
||||||
|
// due to the layout, we handle select separately too first.
|
||||||
|
controllers["P1 Select"] = (controllerState & 0x1) != 0;
|
||||||
|
|
||||||
|
for (int button = 3; button < buttons.Length; button++)
|
||||||
|
{
|
||||||
|
controllers["P1 " + buttons[button]] = (((controllerState >> button) & 0x1) != 0);
|
||||||
|
if (((controllerState >> button) & 0x1) != 0 && button > 15)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.player1Type == OctoshockDll.ePeripheralType.DualShock)
|
||||||
|
{
|
||||||
|
controllers["P1 L3"] = (controllerState & 0x2) != 0;
|
||||||
|
controllers["P1 R3"] = (controllerState & 0x4) != 0;
|
||||||
|
Tuple<string, float> leftX = new Tuple<string, float>("P1 LStick X", (float)br.ReadByte());
|
||||||
|
Tuple<string, float> leftY = new Tuple<string, float>("P1 LStick Y", (float)br.ReadByte());
|
||||||
|
Tuple<string, float> rightX = new Tuple<string, float>("P1 RStick X", (float)br.ReadByte());
|
||||||
|
Tuple<string, float> rightY = new Tuple<string, float>("P1 RStick Y", (float)br.ReadByte());
|
||||||
|
|
||||||
|
controllers.AcceptNewFloats(new[] { leftX, leftY, rightX, rightY });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.player2Type != OctoshockDll.ePeripheralType.None)
|
||||||
|
{
|
||||||
|
UInt16 controllerState = br.ReadUInt16();
|
||||||
|
for (int button = 0; button < buttons.Length; button++)
|
||||||
|
{
|
||||||
|
controllers["P2 " + buttons[button]] = (((controllerState >> button) & 0x1) != 0);
|
||||||
|
if (((controllerState >> button) & 0x1) != 0 && button > 15)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.player2Type == OctoshockDll.ePeripheralType.DualShock)
|
||||||
|
{
|
||||||
|
Tuple<string, float> leftX = new Tuple<string, float>("P2 LStick X", (float)br.ReadByte());
|
||||||
|
Tuple<string, float> leftY = new Tuple<string, float>("P2 LStick Y", (float)br.ReadByte());
|
||||||
|
Tuple<string, float> rightX = new Tuple<string, float>("P2 RStick X", (float)br.ReadByte());
|
||||||
|
Tuple<string, float> rightY = new Tuple<string, float>("P2 RStick Y", (float)br.ReadByte());
|
||||||
|
|
||||||
|
controllers.AcceptNewFloats(new[] { leftX, leftY, rightX, rightY });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
byte controlState = br.ReadByte();
|
||||||
|
controllers["Reset"] = (controlState & 0x02) != 0;
|
||||||
|
if ((controlState & 0x04) != 0)
|
||||||
|
{
|
||||||
|
if (isCdTrayOpen)
|
||||||
|
{
|
||||||
|
controllers["Close"] = true;
|
||||||
|
cdNumber++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
controllers["Open"] = true;
|
||||||
|
}
|
||||||
|
isCdTrayOpen = !isCdTrayOpen;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
controllers["Close"] = false;
|
||||||
|
controllers["Open"] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, float> discSelect = new Tuple<string, float>("Disc Select", cdNumber);
|
||||||
|
controllers.AcceptNewFloats(new[] { discSelect });
|
||||||
|
|
||||||
|
if ((controlState & 0xFC) != 0)
|
||||||
|
{
|
||||||
|
Result.Warnings.Add("Ignored toggle hack flag on frame " + frame.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
movie.AppendFrame(controllers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void parseTextInputLog(BinaryReader br, Bk2Movie movie, MiscHeaderInfo info)
|
||||||
|
{
|
||||||
|
Octoshock.SyncSettings settings = new Octoshock.SyncSettings();
|
||||||
|
SimpleController controllers = new SimpleController();
|
||||||
|
settings.FIOConfig.Devices8 =
|
||||||
|
new[] {
|
||||||
|
info.player1Type,
|
||||||
|
OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,
|
||||||
|
info.player2Type,
|
||||||
|
OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None,OctoshockDll.ePeripheralType.None
|
||||||
|
};
|
||||||
|
controllers.Type = Octoshock.CreateControllerDefinition(settings);
|
||||||
|
|
||||||
|
string[] buttons = { "Select", "L3", "R3", "Start", "Up", "Right", "Down", "Left",
|
||||||
|
"L2", "R2", "L1", "R1", "Triangle", "Circle", "Cross", "Square"};
|
||||||
|
|
||||||
|
bool isCdTrayOpen = false;
|
||||||
|
int cdNumber = 1;
|
||||||
|
|
||||||
|
for (int frame = 0; frame < info.frameCount; ++frame)
|
||||||
|
{
|
||||||
|
if (info.player1Type != OctoshockDll.ePeripheralType.None)
|
||||||
|
{
|
||||||
|
// As L3 and R3 don't exist on a standard gamepad, handle them separately later. Unfortunately
|
||||||
|
// due to the layout, we handle select separately too first.
|
||||||
|
controllers["P1 Select"] = br.ReadChar() != '.';
|
||||||
|
|
||||||
|
if (info.player1Type == OctoshockDll.ePeripheralType.DualShock)
|
||||||
|
{
|
||||||
|
controllers["P1 L3"] = br.ReadChar() != '.';
|
||||||
|
controllers["P1 R3"] = br.ReadChar() != '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int button = 3; button < buttons.Length; button++)
|
||||||
|
{
|
||||||
|
controllers["P1 " + buttons[button]] = br.ReadChar() != '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.player1Type == OctoshockDll.ePeripheralType.DualShock)
|
||||||
|
{
|
||||||
|
// The analog controls are encoded as four space-separated numbers with a leading space
|
||||||
|
string leftXRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
string leftYRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
string rightXRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
string rightYRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
|
||||||
|
|
||||||
|
Tuple<string, float> leftX = new Tuple<string, float>("P1 LStick X", float.Parse(leftXRaw));
|
||||||
|
Tuple<string, float> leftY = new Tuple<string, float>("P1 LStick Y", float.Parse(leftYRaw));
|
||||||
|
Tuple<string, float> rightX = new Tuple<string, float>("P1 RStick X", float.Parse(rightXRaw));
|
||||||
|
Tuple<string, float> rightY = new Tuple<string, float>("P1 RStick Y", float.Parse(rightYRaw));
|
||||||
|
|
||||||
|
controllers.AcceptNewFloats(new[] { leftX, leftY, rightX, rightY });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Each controller is terminated with a pipeline.
|
||||||
|
br.ReadChar();
|
||||||
|
|
||||||
|
if (info.player2Type != OctoshockDll.ePeripheralType.None)
|
||||||
|
{
|
||||||
|
// As L3 and R3 don't exist on a standard gamepad, handle them separately later. Unfortunately
|
||||||
|
// due to the layout, we handle select separately too first.
|
||||||
|
controllers["P2 Select"] = br.ReadChar() != '.';
|
||||||
|
|
||||||
|
if (info.player2Type == OctoshockDll.ePeripheralType.DualShock)
|
||||||
|
{
|
||||||
|
controllers["P2 L3"] = br.ReadChar() != '.';
|
||||||
|
controllers["P2 R3"] = br.ReadChar() != '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int button = 3; button < buttons.Length; button++)
|
||||||
|
{
|
||||||
|
controllers["P2 " + buttons[button]] = br.ReadChar() != '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.player2Type == OctoshockDll.ePeripheralType.DualShock)
|
||||||
|
{
|
||||||
|
// The analog controls are encoded as four space-separated numbers with a leading space
|
||||||
|
string leftXRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
string leftYRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
string rightXRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
string rightYRaw = new string(br.ReadChars(4)).Trim();
|
||||||
|
|
||||||
|
|
||||||
|
Tuple<string, float> leftX = new Tuple<string, float>("P2 LStick X", float.Parse(leftXRaw));
|
||||||
|
Tuple<string, float> leftY = new Tuple<string, float>("P2 LStick Y", float.Parse(leftYRaw));
|
||||||
|
Tuple<string, float> rightX = new Tuple<string, float>("P2 RStick X", float.Parse(rightXRaw));
|
||||||
|
Tuple<string, float> rightY = new Tuple<string, float>("P2 RStick Y", float.Parse(rightYRaw));
|
||||||
|
|
||||||
|
controllers.AcceptNewFloats(new[] { leftX, leftY, rightX, rightY });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Each controller is terminated with a pipeline.
|
||||||
|
br.ReadChar();
|
||||||
|
|
||||||
|
byte controlState = br.ReadByte();
|
||||||
|
controllers["Reset"] = (controlState & 0x02) != 0;
|
||||||
|
if ((controlState & 0x04) != 0)
|
||||||
|
{
|
||||||
|
if (isCdTrayOpen)
|
||||||
|
{
|
||||||
|
controllers["Close"] = true;
|
||||||
|
cdNumber++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
controllers["Open"] = true;
|
||||||
|
}
|
||||||
|
isCdTrayOpen = !isCdTrayOpen;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
controllers["Close"] = false;
|
||||||
|
controllers["Open"] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, float> discSelect = new Tuple<string, float>("Disc Select", cdNumber);
|
||||||
|
controllers.AcceptNewFloats(new[] { discSelect });
|
||||||
|
|
||||||
|
if ((controlState & 0xFC) != 0)
|
||||||
|
{
|
||||||
|
Result.Warnings.Add("Ignored toggle hack flag on frame " + frame.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Each controller is terminated with a pipeline.
|
||||||
|
br.ReadChar();
|
||||||
|
|
||||||
|
movie.AppendFrame(controllers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected class MiscHeaderInfo
|
||||||
|
{
|
||||||
|
public bool binaryFormat = true;
|
||||||
|
public UInt32 controllerDataOffset;
|
||||||
|
public UInt32 frameCount;
|
||||||
|
public OctoshockDll.ePeripheralType player1Type;
|
||||||
|
public OctoshockDll.ePeripheralType player2Type;
|
||||||
|
|
||||||
|
public bool parseSuccessful = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.Common.movie.import
|
||||||
|
{
|
||||||
|
|
||||||
|
// PXM files are directly compatible with binary-format PJM files, with the only
|
||||||
|
// difference being fewer flags implemented in the header, hence just calling the
|
||||||
|
// base class methods via a subclass.
|
||||||
|
//
|
||||||
|
// However, the magic number/file signature is slightly different, requiring some
|
||||||
|
// refactoring to avoid PXM-specific code in the PJMImport class.
|
||||||
|
[ImportExtension(".pxm")]
|
||||||
|
class PXMImport : PJMImport
|
||||||
|
{
|
||||||
|
protected override void RunImport()
|
||||||
|
{
|
||||||
|
Bk2Movie movie = Result.Movie;
|
||||||
|
MiscHeaderInfo info;
|
||||||
|
|
||||||
|
movie.HeaderEntries[HeaderKeys.PLATFORM] = "PSX";
|
||||||
|
|
||||||
|
using (var fs = SourceFile.OpenRead())
|
||||||
|
{
|
||||||
|
using (var br = new BinaryReader(fs))
|
||||||
|
{
|
||||||
|
info = parseHeader(movie, "PXM ", br);
|
||||||
|
|
||||||
|
fs.Seek(info.controllerDataOffset, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
if (info.binaryFormat)
|
||||||
|
{
|
||||||
|
parseBinaryInputLog(br, movie, info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parseTextInputLog(br, movie, info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
movie.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -82,8 +82,8 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
bs.PutLump(BinaryStateLump.MovieSaveRam, (BinaryWriter bw) => bw.Write(SaveRam));
|
bs.PutLump(BinaryStateLump.MovieSaveRam, (BinaryWriter bw) => bw.Write(SaveRam));
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportProgress(PROGRESS_STEP);
|
ReportProgress(PROGRESS_STEP);
|
||||||
|
|
||||||
if (ClientSettingsForSave != null)
|
if (ClientSettingsForSave != null)
|
||||||
{
|
{
|
||||||
var clientSettingsJson = ClientSettingsForSave();
|
var clientSettingsJson = ClientSettingsForSave();
|
||||||
|
@ -99,9 +99,14 @@ namespace BizHawk.Client.Common
|
||||||
if (Branches.Any())
|
if (Branches.Any())
|
||||||
{
|
{
|
||||||
Branches.Save(bs);
|
Branches.Save(bs);
|
||||||
|
if (StateManager.Settings.BranchStatesInTasproj)
|
||||||
|
{
|
||||||
|
bs.PutLump(BinaryStateLump.BranchStateHistory, (BinaryWriter bw) => StateManager.SaveBranchStates(bw));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportProgress(PROGRESS_STEP);
|
ReportProgress(PROGRESS_STEP);
|
||||||
|
|
||||||
|
bs.PutLump(BinaryStateLump.Session, tw => tw.WriteLine(Session.ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Changes = false;
|
Changes = false;
|
||||||
|
@ -288,6 +293,18 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
Branches.Load(bl, this);
|
Branches.Load(bl, this);
|
||||||
|
if (StateManager.Settings.BranchStatesInTasproj)
|
||||||
|
{
|
||||||
|
bl.GetLump(BinaryStateLump.BranchStateHistory, false, delegate(BinaryReader br, long length)
|
||||||
|
{
|
||||||
|
StateManager.LoadBranchStates(br);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
bl.GetLump(BinaryStateLump.Session, false, delegate(TextReader tr)
|
||||||
|
{
|
||||||
|
Session.PopulateFromString(tr.ReadToEnd());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Changes = false;
|
Changes = false;
|
||||||
|
|
|
@ -18,10 +18,10 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
private readonly Bk2MnemonicConstants Mnemonics = new Bk2MnemonicConstants();
|
private readonly Bk2MnemonicConstants Mnemonics = new Bk2MnemonicConstants();
|
||||||
private readonly TasStateManager StateManager;
|
private readonly TasStateManager StateManager;
|
||||||
|
public readonly TasSession Session;
|
||||||
private readonly TasLagLog LagLog = new TasLagLog();
|
private readonly TasLagLog LagLog = new TasLagLog();
|
||||||
private readonly Dictionary<int, IController> InputStateCache = new Dictionary<int, IController>();
|
private readonly Dictionary<int, IController> InputStateCache = new Dictionary<int, IController>();
|
||||||
public readonly List<string> VerificationLog = new List<string>(); // For movies that do not begin with power-on, this is the input required to get into the initial state
|
public readonly List<string> VerificationLog = new List<string>(); // For movies that do not begin with power-on, this is the input required to get into the initial state
|
||||||
|
|
||||||
public readonly TasBranchCollection Branches = new TasBranchCollection();
|
public readonly TasBranchCollection Branches = new TasBranchCollection();
|
||||||
|
|
||||||
private BackgroundWorker _progressReportWorker = null;
|
private BackgroundWorker _progressReportWorker = null;
|
||||||
|
@ -48,12 +48,14 @@ namespace BizHawk.Client.Common
|
||||||
ChangeLog = new TasMovieChangeLog(this);
|
ChangeLog = new TasMovieChangeLog(this);
|
||||||
|
|
||||||
StateManager = new TasStateManager(this);
|
StateManager = new TasStateManager(this);
|
||||||
|
Session = new TasSession(this);
|
||||||
Header[HeaderKeys.MOVIEVERSION] = "BizHawk v2.0 Tasproj v1.0";
|
Header[HeaderKeys.MOVIEVERSION] = "BizHawk v2.0 Tasproj v1.0";
|
||||||
Markers = new TasMovieMarkerList(this);
|
Markers = new TasMovieMarkerList(this);
|
||||||
Markers.CollectionChanged += Markers_CollectionChanged;
|
Markers.CollectionChanged += Markers_CollectionChanged;
|
||||||
Markers.Add(0, startsFromSavestate ? "Savestate" : "Power on");
|
Markers.Add(0, startsFromSavestate ? "Savestate" : "Power on");
|
||||||
|
|
||||||
BindMarkersToInput = true;
|
BindMarkersToInput = true;
|
||||||
|
CurrentBranch = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TasMovie(bool startsFromSavestate = false, BackgroundWorker progressReportWorker = null)
|
public TasMovie(bool startsFromSavestate = false, BackgroundWorker progressReportWorker = null)
|
||||||
|
@ -68,12 +70,14 @@ namespace BizHawk.Client.Common
|
||||||
ChangeLog = new TasMovieChangeLog(this);
|
ChangeLog = new TasMovieChangeLog(this);
|
||||||
|
|
||||||
StateManager = new TasStateManager(this);
|
StateManager = new TasStateManager(this);
|
||||||
|
Session = new TasSession(this);
|
||||||
Header[HeaderKeys.MOVIEVERSION] = "BizHawk v2.0 Tasproj v1.0";
|
Header[HeaderKeys.MOVIEVERSION] = "BizHawk v2.0 Tasproj v1.0";
|
||||||
Markers = new TasMovieMarkerList(this);
|
Markers = new TasMovieMarkerList(this);
|
||||||
Markers.CollectionChanged += Markers_CollectionChanged;
|
Markers.CollectionChanged += Markers_CollectionChanged;
|
||||||
Markers.Add(0, startsFromSavestate ? "Savestate" : "Power on");
|
Markers.Add(0, startsFromSavestate ? "Savestate" : "Power on");
|
||||||
|
|
||||||
BindMarkersToInput = true;
|
BindMarkersToInput = true;
|
||||||
|
CurrentBranch = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TasLagLog TasLagLog { get { return LagLog; } }
|
public TasLagLog TasLagLog { get { return LagLog; } }
|
||||||
|
@ -81,6 +85,7 @@ namespace BizHawk.Client.Common
|
||||||
public TasMovieMarkerList Markers { get; set; }
|
public TasMovieMarkerList Markers { get; set; }
|
||||||
public bool BindMarkersToInput { get; set; }
|
public bool BindMarkersToInput { get; set; }
|
||||||
public bool UseInputCache { get; set; }
|
public bool UseInputCache { get; set; }
|
||||||
|
public int CurrentBranch { get; set; }
|
||||||
public int BranchCount { get { return Branches.Count; } }
|
public int BranchCount { get { return Branches.Count; } }
|
||||||
public TasBranch GetBranch(int index)
|
public TasBranch GetBranch(int index)
|
||||||
{
|
{
|
||||||
|
@ -497,12 +502,14 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
_log = branch.InputLog.ToList();
|
_log = branch.InputLog.ToList();
|
||||||
//_changes = true;
|
//_changes = true;
|
||||||
LagLog.FromLagLog(branch.LagLog);
|
|
||||||
|
|
||||||
// if there are branch states, they will be loaded anyway
|
// if there are branch states, they will be loaded anyway
|
||||||
// but if there's none, or only *after* divergent point, don't invalidate the entire movie anymore
|
// but if there's none, or only *after* divergent point, don't invalidate the entire movie anymore
|
||||||
if (divergentPoint.HasValue)
|
if (divergentPoint.HasValue)
|
||||||
|
{
|
||||||
StateManager.Invalidate(divergentPoint.Value);
|
StateManager.Invalidate(divergentPoint.Value);
|
||||||
|
LagLog.FromLagLog(branch.LagLog); // don't truncate LagLog if the branch's one is shorter, but input is the same
|
||||||
|
}
|
||||||
else
|
else
|
||||||
StateManager.Invalidate(branch.InputLog.Count);
|
StateManager.Invalidate(branch.InputLog.Count);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.Common
|
||||||
|
{
|
||||||
|
public class TasSession
|
||||||
|
{
|
||||||
|
private TasMovie _movie;
|
||||||
|
public int CurrentFrame { get; set; }
|
||||||
|
public int CurrentBranch { get; set; }
|
||||||
|
|
||||||
|
public TasSession(TasMovie movie)
|
||||||
|
{
|
||||||
|
_movie = movie;
|
||||||
|
CurrentFrame = 0;
|
||||||
|
CurrentBranch = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateValues()
|
||||||
|
{
|
||||||
|
CurrentFrame = Global.Emulator.Frame;
|
||||||
|
CurrentBranch = _movie.CurrentBranch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
UpdateValues();
|
||||||
|
sb.AppendLine(CurrentFrame.ToString());
|
||||||
|
sb.AppendLine(CurrentBranch.ToString());
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PopulateFromString(string session)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(session))
|
||||||
|
{
|
||||||
|
string[] lines = session.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
if (lines.Length > 0)
|
||||||
|
CurrentFrame = int.Parse(lines[0]);
|
||||||
|
else
|
||||||
|
CurrentFrame = 0;
|
||||||
|
|
||||||
|
if (lines.Length > 1)
|
||||||
|
CurrentBranch = int.Parse(lines[1]);
|
||||||
|
else
|
||||||
|
CurrentBranch = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -562,23 +562,6 @@ namespace BizHawk.Client.Common
|
||||||
bw.Write(kvp.Value.Length);
|
bw.Write(kvp.Value.Length);
|
||||||
bw.Write(kvp.Value.State);
|
bw.Write(kvp.Value.State);
|
||||||
}
|
}
|
||||||
|
|
||||||
bw.Write(currentBranch);
|
|
||||||
|
|
||||||
if (Settings.BranchStatesInTasproj)
|
|
||||||
{
|
|
||||||
bw.Write(BranchStates.Count);
|
|
||||||
foreach (var s in BranchStates)
|
|
||||||
{
|
|
||||||
bw.Write(s.Key);
|
|
||||||
bw.Write(s.Value.Count);
|
|
||||||
foreach (var t in s.Value)
|
|
||||||
{
|
|
||||||
bw.Write(t.Key);
|
|
||||||
t.Value.Write(bw);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load(BinaryReader br)
|
public void Load(BinaryReader br)
|
||||||
|
@ -599,11 +582,26 @@ namespace BizHawk.Client.Common
|
||||||
//Used += len;
|
//Used += len;
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
try
|
public void SaveBranchStates(BinaryWriter bw)
|
||||||
{
|
{
|
||||||
currentBranch = br.ReadInt32();
|
bw.Write(BranchStates.Count);
|
||||||
if (Settings.BranchStatesInTasproj)
|
foreach (var s in BranchStates)
|
||||||
|
{
|
||||||
|
bw.Write(s.Key);
|
||||||
|
bw.Write(s.Value.Count);
|
||||||
|
foreach (var t in s.Value)
|
||||||
|
{
|
||||||
|
bw.Write(t.Key);
|
||||||
|
t.Value.Write(bw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadBranchStates(BinaryReader br)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
int c = br.ReadInt32();
|
int c = br.ReadInt32();
|
||||||
BranchStates = new SortedList<int, SortedList<int, StateManagerState>>(c);
|
BranchStates = new SortedList<int, SortedList<int, StateManagerState>>(c);
|
||||||
|
@ -623,10 +621,10 @@ namespace BizHawk.Client.Common
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (EndOfStreamException) { }
|
catch (EndOfStreamException) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public KeyValuePair<int, byte[]> GetStateClosestToFrame(int frame)
|
public KeyValuePair<int, byte[]> GetStateClosestToFrame(int frame)
|
||||||
{
|
{
|
||||||
var s = States.LastOrDefault(state => state.Key < frame);
|
var s = States.LastOrDefault(state => state.Key < frame);
|
||||||
|
@ -699,7 +697,6 @@ namespace BizHawk.Client.Common
|
||||||
#region "Branches"
|
#region "Branches"
|
||||||
|
|
||||||
private SortedList<int, SortedList<int, StateManagerState>> BranchStates = new SortedList<int, SortedList<int, StateManagerState>>();
|
private SortedList<int, SortedList<int, StateManagerState>> BranchStates = new SortedList<int, SortedList<int, StateManagerState>>();
|
||||||
private int currentBranch = -1;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the state at frame in the given branch (-1 for current) has any duplicates.
|
/// Checks if the state at frame in the given branch (-1 for current) has any duplicates.
|
||||||
|
@ -776,7 +773,6 @@ namespace BizHawk.Client.Common
|
||||||
stateList.Add(branchHash, kvp.Value);
|
stateList.Add(branchHash, kvp.Value);
|
||||||
Used += (ulong)stateList[branchHash].Length;
|
Used += (ulong)stateList[branchHash].Length;
|
||||||
}
|
}
|
||||||
currentBranch = _movie.BranchCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveBranch(int index)
|
public void RemoveBranch(int index)
|
||||||
|
@ -804,10 +800,6 @@ namespace BizHawk.Client.Common
|
||||||
if (stateList.Count == 0)
|
if (stateList.Count == 0)
|
||||||
BranchStates.Remove(kvp.Key);
|
BranchStates.Remove(kvp.Key);
|
||||||
}
|
}
|
||||||
if (currentBranch > index)
|
|
||||||
currentBranch--;
|
|
||||||
else if (currentBranch == index)
|
|
||||||
currentBranch = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateBranch(int index)
|
public void UpdateBranch(int index)
|
||||||
|
@ -853,7 +845,6 @@ namespace BizHawk.Client.Common
|
||||||
stateList.Add(branchHash, kvp.Value);
|
stateList.Add(branchHash, kvp.Value);
|
||||||
Used += (ulong)stateList[branchHash].Length;
|
Used += (ulong)stateList[branchHash].Length;
|
||||||
}
|
}
|
||||||
currentBranch = index;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadBranch(int index)
|
public void LoadBranch(int index)
|
||||||
|
@ -870,8 +861,6 @@ namespace BizHawk.Client.Common
|
||||||
if (kvp.Value.ContainsKey(branchHash))
|
if (kvp.Value.ContainsKey(branchHash))
|
||||||
SetState(kvp.Key, kvp.Value[branchHash].State);
|
SetState(kvp.Key, kvp.Value[branchHash].State);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentBranch = index;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -466,6 +466,12 @@
|
||||||
<Compile Include="CoreFeatureAnalysis.Designer.cs">
|
<Compile Include="CoreFeatureAnalysis.Designer.cs">
|
||||||
<DependentUpon>CoreFeatureAnalysis.cs</DependentUpon>
|
<DependentUpon>CoreFeatureAnalysis.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="CustomControls\ExceptionBox.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomControls\ExceptionBox.designer.cs">
|
||||||
|
<DependentUpon>ExceptionBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="CustomControls\FolderBrowserDialogEx.cs">
|
<Compile Include="CustomControls\FolderBrowserDialogEx.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -525,9 +531,7 @@
|
||||||
<Compile Include="CustomControls\ViewportPanel.cs">
|
<Compile Include="CustomControls\ViewportPanel.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="CustomControls\VirtualListView.cs">
|
<Compile Include="CustomControls\VirtualListView.cs" />
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="CustomControls\Win32.cs" />
|
<Compile Include="CustomControls\Win32.cs" />
|
||||||
<Compile Include="DisplayManager\DisplayManager.cs" />
|
<Compile Include="DisplayManager\DisplayManager.cs" />
|
||||||
<Compile Include="DisplayManager\DisplaySurface.cs" />
|
<Compile Include="DisplayManager\DisplaySurface.cs" />
|
||||||
|
@ -543,6 +547,7 @@
|
||||||
<Compile Include="Extensions\ControlExtensions.cs" />
|
<Compile Include="Extensions\ControlExtensions.cs" />
|
||||||
<Compile Include="Extensions\CoreExtensions.cs" />
|
<Compile Include="Extensions\CoreExtensions.cs" />
|
||||||
<Compile Include="Extensions\ToolExtensions.cs" />
|
<Compile Include="Extensions\ToolExtensions.cs" />
|
||||||
|
<Compile Include="GLManager.cs" />
|
||||||
<Compile Include="GlobalWin.cs" />
|
<Compile Include="GlobalWin.cs" />
|
||||||
<Compile Include="Input\GamePad.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
<Compile Include="Input\GamePad.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||||
<Compile Include="Input\GamePad360.cs" />
|
<Compile Include="Input\GamePad360.cs" />
|
||||||
|
@ -666,6 +671,12 @@
|
||||||
<DependentUpon>BatchRun.cs</DependentUpon>
|
<DependentUpon>BatchRun.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="tools\BatchRunner.cs" />
|
<Compile Include="tools\BatchRunner.cs" />
|
||||||
|
<Compile Include="tools\CDL.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="tools\CDL.designer.cs">
|
||||||
|
<DependentUpon>CDL.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="tools\Cheats\CheatEdit.cs">
|
<Compile Include="tools\Cheats\CheatEdit.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -911,12 +922,6 @@
|
||||||
<Compile Include="tools\PCE\PCEBGViewer.Designer.cs">
|
<Compile Include="tools\PCE\PCEBGViewer.Designer.cs">
|
||||||
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="tools\PCE\PCECDL.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="tools\PCE\PCECDL.Designer.cs">
|
|
||||||
<DependentUpon>PCECDL.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="tools\PCE\PCESoundDebugger.cs">
|
<Compile Include="tools\PCE\PCESoundDebugger.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -1146,6 +1151,7 @@
|
||||||
<Compile Include="tools\Watch\WatchValueBox.cs">
|
<Compile Include="tools\Watch\WatchValueBox.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UIHelper.cs" />
|
||||||
<Compile Include="UpdateChecker.cs">
|
<Compile Include="UpdateChecker.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -1290,6 +1296,9 @@
|
||||||
<EmbeddedResource Include="CoreFeatureAnalysis.resx">
|
<EmbeddedResource Include="CoreFeatureAnalysis.resx">
|
||||||
<DependentUpon>CoreFeatureAnalysis.cs</DependentUpon>
|
<DependentUpon>CoreFeatureAnalysis.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="CustomControls\ExceptionBox.resx">
|
||||||
|
<DependentUpon>ExceptionBox.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="CustomControls\InputConfigBase.resx">
|
<EmbeddedResource Include="CustomControls\InputConfigBase.resx">
|
||||||
<DependentUpon>InputConfigBase.cs</DependentUpon>
|
<DependentUpon>InputConfigBase.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
@ -1339,6 +1348,9 @@
|
||||||
<EmbeddedResource Include="tools\BatchRun.resx">
|
<EmbeddedResource Include="tools\BatchRun.resx">
|
||||||
<DependentUpon>BatchRun.cs</DependentUpon>
|
<DependentUpon>BatchRun.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="tools\CDL.resx">
|
||||||
|
<DependentUpon>CDL.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="tools\Cheats\CheatEdit.resx">
|
<EmbeddedResource Include="tools\Cheats\CheatEdit.resx">
|
||||||
<DependentUpon>CheatEdit.cs</DependentUpon>
|
<DependentUpon>CheatEdit.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
@ -1436,9 +1448,6 @@
|
||||||
<EmbeddedResource Include="tools\PCE\PCEBGViewer.resx">
|
<EmbeddedResource Include="tools\PCE\PCEBGViewer.resx">
|
||||||
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="tools\PCE\PCECDL.resx">
|
|
||||||
<DependentUpon>PCECDL.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="tools\PCE\PCESoundDebugger.resx">
|
<EmbeddedResource Include="tools\PCE\PCESoundDebugger.resx">
|
||||||
<DependentUpon>PCESoundDebugger.cs</DependentUpon>
|
<DependentUpon>PCESoundDebugger.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,148 @@
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
partial class ExceptionBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.txtException = new System.Windows.Forms.TextBox();
|
||||||
|
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.btnCopy = new System.Windows.Forms.Button();
|
||||||
|
this.lblDone = new ExceptionBox.MyLabel();
|
||||||
|
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(625, 304);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnOK.TabIndex = 0;
|
||||||
|
this.btnOK.Text = "OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.btnOK, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.txtException, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 2;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(703, 330);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// txtException
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.SetColumnSpan(this.txtException, 2);
|
||||||
|
this.txtException.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.txtException.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.txtException.Multiline = true;
|
||||||
|
this.txtException.Name = "txtException";
|
||||||
|
this.txtException.ReadOnly = true;
|
||||||
|
this.txtException.Size = new System.Drawing.Size(697, 295);
|
||||||
|
this.txtException.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// flowLayoutPanel1
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel1.AutoSize = true;
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnCopy);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.lblDone);
|
||||||
|
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 301);
|
||||||
|
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
|
this.flowLayoutPanel1.Size = new System.Drawing.Size(87, 29);
|
||||||
|
this.flowLayoutPanel1.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
this.btnCopy.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.btnCopy.Name = "btnCopy";
|
||||||
|
this.btnCopy.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnCopy.TabIndex = 3;
|
||||||
|
this.btnCopy.Text = "Copy";
|
||||||
|
this.btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
|
||||||
|
//
|
||||||
|
// lblDone
|
||||||
|
//
|
||||||
|
this.lblDone.AutoSize = true;
|
||||||
|
this.lblDone.Location = new System.Drawing.Point(84, 10);
|
||||||
|
this.lblDone.Margin = new System.Windows.Forms.Padding(3, 10, 3, 0);
|
||||||
|
this.lblDone.Name = "lblDone";
|
||||||
|
this.lblDone.Size = new System.Drawing.Size(0, 13);
|
||||||
|
this.lblDone.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// timer1
|
||||||
|
//
|
||||||
|
this.timer1.Enabled = true;
|
||||||
|
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||||
|
//
|
||||||
|
// ExceptionBox
|
||||||
|
//
|
||||||
|
this.AcceptButton = this.btnOK;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.CancelButton = this.btnOK;
|
||||||
|
this.ClientSize = new System.Drawing.Size(703, 330);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ExceptionBox";
|
||||||
|
this.Text = "Exception";
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
this.flowLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.TextBox txtException;
|
||||||
|
private System.Windows.Forms.Timer timer1;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
|
private ExceptionBox.MyLabel lblDone;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
public partial class ExceptionBox : Form
|
||||||
|
{
|
||||||
|
public ExceptionBox(Exception ex)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
txtException.Text = ex.ToString();
|
||||||
|
timer1.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCopy_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DoCopy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoCopy()
|
||||||
|
{
|
||||||
|
string txt = txtException.Text;
|
||||||
|
Clipboard.SetText(txt);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Clipboard.GetText() == txt)
|
||||||
|
{
|
||||||
|
lblDone.Text = "Done!";
|
||||||
|
lblDone.ForeColor = SystemColors.ControlText;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
lblDone.Text = "ERROR!";
|
||||||
|
lblDone.ForeColor = SystemColors.ControlText;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||||
|
{
|
||||||
|
if (keyData == (Keys.C | Keys.Control))
|
||||||
|
{
|
||||||
|
DoCopy();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void timer1_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int a = lblDone.ForeColor.A - 16;
|
||||||
|
if (a < 0) a = 0;
|
||||||
|
lblDone.ForeColor = Color.FromArgb(a, lblDone.ForeColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
//http://stackoverflow.com/questions/2636065/alpha-in-forecolor
|
||||||
|
class MyLabel : Label
|
||||||
|
{
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
Rectangle rc = this.ClientRectangle;
|
||||||
|
StringFormat fmt = new StringFormat(StringFormat.GenericTypographic);
|
||||||
|
using (var br = new SolidBrush(this.ForeColor))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawString(this.Text, this.Font, br, rc, fmt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,123 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
|
@ -30,11 +30,27 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void SetHexProperties(long domainSize)
|
public void SetHexProperties(long domainSize)
|
||||||
{
|
{
|
||||||
|
bool wasMaxSizeSet = _maxSize.HasValue;
|
||||||
|
int currMaxLength = MaxLength;
|
||||||
|
|
||||||
_maxSize = domainSize - 1;
|
_maxSize = domainSize - 1;
|
||||||
|
|
||||||
MaxLength = _maxSize.Value.NumHexDigits();
|
MaxLength = _maxSize.Value.NumHexDigits();
|
||||||
_addressFormatStr = "{0:X" + MaxLength + "}";
|
_addressFormatStr = "{0:X" + MaxLength + "}";
|
||||||
|
|
||||||
|
//try to preserve the old value, as best we can
|
||||||
|
if(!wasMaxSizeSet)
|
||||||
ResetText();
|
ResetText();
|
||||||
|
else if(_nullable)
|
||||||
|
Text = "";
|
||||||
|
else if (MaxLength != currMaxLength)
|
||||||
|
{
|
||||||
|
long? value = ToLong();
|
||||||
|
if (value.HasValue)
|
||||||
|
value = value.Value & ((1L << (MaxLength * 4)) - 1);
|
||||||
|
else value = 0;
|
||||||
|
Text = string.Format(_addressFormatStr, value.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetMax()
|
public long GetMax()
|
||||||
|
|
|
@ -743,7 +743,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return (index >= FirstVisibleRow) && (index <= LastFullyVisibleRow);
|
return (index >= FirstVisibleRow) && (index <= LastFullyVisibleRow);
|
||||||
}
|
}
|
||||||
public bool IsPartiallyVisible(int index)
|
public bool IsPartiallyVisible(int index)
|
||||||
{ return (index >= FirstVisibleRow) && (index <= LastVisibleRow); }
|
{
|
||||||
|
return (index >= FirstVisibleRow) && (index <= LastVisibleRow);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of rows currently visible including partially visible rows.
|
/// Gets the number of rows currently visible including partially visible rows.
|
||||||
|
|
|
@ -65,14 +65,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (GL is BizHawk.Bizware.BizwareGL.Drivers.OpenTK.IGL_TK || GL is BizHawk.Bizware.BizwareGL.Drivers.SlimDX.IGL_SlimDX9)
|
if (GL is BizHawk.Bizware.BizwareGL.Drivers.OpenTK.IGL_TK || GL is BizHawk.Bizware.BizwareGL.Drivers.SlimDX.IGL_SlimDX9)
|
||||||
{
|
{
|
||||||
//var fiHq2x = new FileInfo(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk/hq2x.cgp"));
|
var fiHq2x = new FileInfo(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk/hq2x.cgp"));
|
||||||
//if (fiHq2x.Exists)
|
if (fiHq2x.Exists)
|
||||||
// using (var stream = fiHq2x.OpenRead())
|
using (var stream = fiHq2x.OpenRead())
|
||||||
// ShaderChain_hq2x = new Filters.RetroShaderChain(GL, new Filters.RetroShaderPreset(stream), Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk"));
|
ShaderChain_hq2x = new Filters.RetroShaderChain(GL, new Filters.RetroShaderPreset(stream), Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk"));
|
||||||
//var fiScanlines = new FileInfo(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk/BizScanlines.cgp"));
|
var fiScanlines = new FileInfo(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk/BizScanlines.cgp"));
|
||||||
//if (fiScanlines.Exists)
|
if (fiScanlines.Exists)
|
||||||
// using (var stream = fiScanlines.OpenRead())
|
using (var stream = fiScanlines.OpenRead())
|
||||||
// ShaderChain_scanlines = new Filters.RetroShaderChain(GL, new Filters.RetroShaderPreset(stream), Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk"));
|
ShaderChain_scanlines = new Filters.RetroShaderChain(GL, new Filters.RetroShaderPreset(stream), Path.Combine(PathManager.GetExeDirectoryAbsolute(), "Shaders/BizHawk"));
|
||||||
string bicubic_path = "Shaders/BizHawk/bicubic-fast.cgp";
|
string bicubic_path = "Shaders/BizHawk/bicubic-fast.cgp";
|
||||||
if(GL is BizHawk.Bizware.BizwareGL.Drivers.SlimDX.IGL_SlimDX9)
|
if(GL is BizHawk.Bizware.BizwareGL.Drivers.SlimDX.IGL_SlimDX9)
|
||||||
bicubic_path = "Shaders/BizHawk/bicubic-normal.cgp";
|
bicubic_path = "Shaders/BizHawk/bicubic-normal.cgp";
|
||||||
|
@ -128,6 +128,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public System.Windows.Forms.Padding GameExtraPadding;
|
public System.Windows.Forms.Padding GameExtraPadding;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// additional pixels added at the native level for the use of lua drawing. essentially just gets tacked onto the final calculated window sizes.
|
||||||
|
/// </summary>
|
||||||
|
public System.Windows.Forms.Padding ClientExtraPadding;
|
||||||
|
|
||||||
TextureFrugalizer VideoTextureFrugalizer;
|
TextureFrugalizer VideoTextureFrugalizer;
|
||||||
Dictionary<string, TextureFrugalizer> LuaSurfaceFrugalizers = new Dictionary<string, TextureFrugalizer>();
|
Dictionary<string, TextureFrugalizer> LuaSurfaceFrugalizers = new Dictionary<string, TextureFrugalizer>();
|
||||||
RenderTargetFrugalizer[] ShaderChainFrugalizers;
|
RenderTargetFrugalizer[] ShaderChainFrugalizers;
|
||||||
|
@ -177,7 +182,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
selectedChain = ShaderChain_hq2x;
|
selectedChain = ShaderChain_hq2x;
|
||||||
if (Global.Config.TargetDisplayFilter == 2 && ShaderChain_scanlines != null && ShaderChain_scanlines.Available)
|
if (Global.Config.TargetDisplayFilter == 2 && ShaderChain_scanlines != null && ShaderChain_scanlines.Available)
|
||||||
{
|
{
|
||||||
//shader.Pipeline["uIntensity"].Set(1.0f - Global.Config.TargetScanlineFilterIntensity / 256.0f);
|
|
||||||
selectedChain = ShaderChain_scanlines;
|
selectedChain = ShaderChain_scanlines;
|
||||||
selectedChainProperties["uIntensity"] = 1.0f - Global.Config.TargetScanlineFilterIntensity / 256.0f;
|
selectedChainProperties["uIntensity"] = 1.0f - Global.Config.TargetScanlineFilterIntensity / 256.0f;
|
||||||
}
|
}
|
||||||
|
@ -375,6 +379,24 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public int BackgroundColor { get; set; }
|
public int BackgroundColor { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FixRatio(float x, float y, int inw, int inh, out int outw, out int outh)
|
||||||
|
{
|
||||||
|
float ratio = x / y;
|
||||||
|
if (ratio <= 1)
|
||||||
|
{
|
||||||
|
//taller. weird. expand height.
|
||||||
|
outw = inw;
|
||||||
|
outh = (int)((float)inw / ratio);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//wider. normal. expand width.
|
||||||
|
outw = (int)((float)inh * ratio);
|
||||||
|
outh = inh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to calculate a good client size with the given zoom factor, considering the user's DisplayManager preferences
|
/// Attempts to calculate a good client size with the given zoom factor, considering the user's DisplayManager preferences
|
||||||
/// TODO - this needs to be redone with a concept different from zoom factor.
|
/// TODO - this needs to be redone with a concept different from zoom factor.
|
||||||
|
@ -385,7 +407,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
bool ar_active = Global.Config.DispFixAspectRatio;
|
bool ar_active = Global.Config.DispFixAspectRatio;
|
||||||
bool ar_system = Global.Config.DispManagerAR == Config.EDispManagerAR.System;
|
bool ar_system = Global.Config.DispManagerAR == Config.EDispManagerAR.System;
|
||||||
bool ar_custom = Global.Config.DispManagerAR == Config.EDispManagerAR.Custom;
|
bool ar_custom = Global.Config.DispManagerAR == Config.EDispManagerAR.Custom;
|
||||||
bool ar_correct = ar_system || ar_custom;
|
bool ar_customRatio = Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio;
|
||||||
|
bool ar_correct = ar_system || ar_custom || ar_customRatio;
|
||||||
bool ar_unity = !ar_correct;
|
bool ar_unity = !ar_correct;
|
||||||
bool ar_integer = Global.Config.DispFixScaleInteger;
|
bool ar_integer = Global.Config.DispFixScaleInteger;
|
||||||
|
|
||||||
|
@ -400,6 +423,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
virtualHeight = Global.Config.DispCustomUserARHeight;
|
virtualHeight = Global.Config.DispCustomUserARHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ar_customRatio)
|
||||||
|
{
|
||||||
|
FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out virtualWidth, out virtualHeight);
|
||||||
|
}
|
||||||
|
|
||||||
var padding = CalculateCompleteContentPadding(true, false);
|
var padding = CalculateCompleteContentPadding(true, false);
|
||||||
virtualWidth += padding.Horizontal;
|
virtualWidth += padding.Horizontal;
|
||||||
virtualHeight += padding.Vertical;
|
virtualHeight += padding.Vertical;
|
||||||
|
@ -498,6 +526,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
chain_outsize = new Size(bufferWidth * zoom, bufferHeight * zoom);
|
chain_outsize = new Size(bufferWidth * zoom, bufferHeight * zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chain_outsize.Width += ClientExtraPadding.Horizontal;
|
||||||
|
chain_outsize.Height += ClientExtraPadding.Vertical;
|
||||||
|
|
||||||
var job = new JobInfo
|
var job = new JobInfo
|
||||||
{
|
{
|
||||||
videoProvider = fvp,
|
videoProvider = fvp,
|
||||||
|
@ -550,6 +581,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
vw = Global.Config.DispCustomUserARWidth;
|
vw = Global.Config.DispCustomUserARWidth;
|
||||||
vh = Global.Config.DispCustomUserARHeight;
|
vh = Global.Config.DispCustomUserARHeight;
|
||||||
}
|
}
|
||||||
|
if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
|
||||||
|
{
|
||||||
|
FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out vw, out vh);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var padding = CalculateCompleteContentPadding(true,false);
|
var padding = CalculateCompleteContentPadding(true,false);
|
||||||
|
@ -609,6 +644,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
fPresent.GuiRenderer = Renderer;
|
fPresent.GuiRenderer = Renderer;
|
||||||
fPresent.Config_FixAspectRatio = Global.Config.DispFixAspectRatio;
|
fPresent.Config_FixAspectRatio = Global.Config.DispFixAspectRatio;
|
||||||
fPresent.Config_FixScaleInteger = Global.Config.DispFixScaleInteger;
|
fPresent.Config_FixScaleInteger = Global.Config.DispFixScaleInteger;
|
||||||
|
fPresent.Padding = ClientExtraPadding;
|
||||||
|
|
||||||
fPresent.GL = GL;
|
fPresent.GL = GL;
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,8 @@ namespace BizHawk.Client.EmuHawk.Filters
|
||||||
PS = trials[bestIndex];
|
PS = trials[bestIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
vw = (int)(PS.X * textureWidth);
|
vw = (int)(PS.X * oldSourceWidth);
|
||||||
vh = (int)(PS.Y * textureHeight);
|
vh = (int)(PS.Y * oldSourceHeight);
|
||||||
widthScale = PS.X;
|
widthScale = PS.X;
|
||||||
heightScale = PS.Y;
|
heightScale = PS.Y;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,11 @@ namespace BizHawk.Client.EmuHawk.Filters
|
||||||
LL.vh = size.Height;
|
LL.vh = size.Height;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, OutputSize.Width, OutputSize.Height, size.Width, size.Height, TextureSize, VirtualTextureSize);
|
LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, OutputSize.Width, OutputSize.Height, size.Width, size.Height, TextureSize, VirtualTextureSize);
|
||||||
|
LL.vx += Padding.Left;
|
||||||
|
LL.vy += Padding.Top;
|
||||||
|
}
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@ -253,9 +257,19 @@ namespace BizHawk.Client.EmuHawk.Filters
|
||||||
LL.vy += Padding.Top;
|
LL.vy += Padding.Top;
|
||||||
LL.vw = InputSize.Width;
|
LL.vw = InputSize.Width;
|
||||||
LL.vh = InputSize.Height;
|
LL.vh = InputSize.Height;
|
||||||
|
LL.WidthScale = 1;
|
||||||
|
LL.HeightScale = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, OutputSize.Width, OutputSize.Height, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
|
{
|
||||||
|
int ow = OutputSize.Width;
|
||||||
|
int oh = OutputSize.Height;
|
||||||
|
ow -= Padding.Horizontal;
|
||||||
|
oh -= Padding.Vertical;
|
||||||
|
LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, ow, oh, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
|
||||||
|
LL.vx += Padding.Left;
|
||||||
|
LL.vy += Padding.Top;
|
||||||
|
}
|
||||||
ContentSize = new Size(LL.vw,LL.vh);
|
ContentSize = new Size(LL.vw,LL.vh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ using System.Linq;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
|
@ -24,6 +25,21 @@ namespace BizHawk.Client.EmuHawk.Filters
|
||||||
{
|
{
|
||||||
public class RetroShaderChain : IDisposable
|
public class RetroShaderChain : IDisposable
|
||||||
{
|
{
|
||||||
|
static System.Text.RegularExpressions.Regex rxInclude = new Regex(@"^(\s)?\#include(\s)+(""|<)(.*)?(""|>)", RegexOptions.Multiline | RegexOptions.IgnoreCase);
|
||||||
|
static string ResolveIncludes(string content, string baseDirectory)
|
||||||
|
{
|
||||||
|
for (; ; )
|
||||||
|
{
|
||||||
|
var match = rxInclude.Match(content);
|
||||||
|
if(match.Value == "") break;
|
||||||
|
string fname = match.Groups[4].Value;
|
||||||
|
fname = Path.Combine(baseDirectory,fname);
|
||||||
|
string includedContent = ResolveIncludes(File.ReadAllText(fname),Path.GetDirectoryName(fname));
|
||||||
|
content = content.Substring(0, match.Index) + includedContent + content.Substring(match.Index + match.Length);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
public RetroShaderChain(IGL owner, RetroShaderPreset preset, string baseDirectory, bool debug = false)
|
public RetroShaderChain(IGL owner, RetroShaderPreset preset, string baseDirectory, bool debug = false)
|
||||||
{
|
{
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
|
@ -45,12 +61,15 @@ namespace BizHawk.Client.EmuHawk.Filters
|
||||||
ok = false;
|
ok = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string content = File.ReadAllText(path);
|
string content = ResolveIncludes(File.ReadAllText(path), Path.GetDirectoryName(path));
|
||||||
|
|
||||||
|
|
||||||
var shader = new RetroShader(Owner, content, debug);
|
var shader = new RetroShader(Owner, content, debug);
|
||||||
Shaders[i] = shader;
|
Shaders[i] = shader;
|
||||||
if (!shader.Pipeline.Available)
|
if (!shader.Pipeline.Available)
|
||||||
ok = false;
|
ok = false;
|
||||||
|
if (!shader.Available)
|
||||||
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Available = ok;
|
Available = ok;
|
||||||
|
@ -140,6 +159,20 @@ namespace BizHawk.Client.EmuHawk.Filters
|
||||||
|
|
||||||
public List<ShaderPass> Passes = new List<ShaderPass>();
|
public List<ShaderPass> Passes = new List<ShaderPass>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether any of the passes contain GLSL filenames (these are invalid now)
|
||||||
|
/// </summary>
|
||||||
|
public bool ContainsGLSL
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
foreach (var pass in Passes)
|
||||||
|
if (Path.GetExtension(pass.ShaderPath).ToLowerInvariant() == ".glsl")
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum ScaleType
|
public enum ScaleType
|
||||||
{
|
{
|
||||||
NotSet, Source, Viewport, Absolute
|
NotSet, Source, Viewport, Absolute
|
||||||
|
|
|
@ -2,18 +2,22 @@ using System;
|
||||||
using BizHawk.Bizware.BizwareGL;
|
using BizHawk.Bizware.BizwareGL;
|
||||||
|
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This singleton class manages OpenGL contexts, in an effort to minimize context changes.
|
/// This singleton class manages OpenGL contexts, in an effort to minimize context changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GLManager
|
public class GLManager : IDisposable
|
||||||
{
|
{
|
||||||
private GLManager()
|
private GLManager()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public static GLManager Instance { get; private set; }
|
public static GLManager Instance { get; private set; }
|
||||||
|
|
||||||
public static void CreateInstance()
|
public static void CreateInstance()
|
File diff suppressed because it is too large
Load Diff
|
@ -455,7 +455,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId),
|
InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId),
|
||||||
Multiselect = true,
|
Multiselect = true,
|
||||||
Filter = FormatFilter(
|
Filter = FormatFilter(
|
||||||
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.gmv;*.vbm;*.lsmv;*.fcm;*.fmv;*.vmv;*.nmv;*.smv;*.ymv;*.zmv;*.bkm",
|
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.gmv;*.vbm;*.lsmv;*.fcm;*.fmv;*.vmv;*.nmv;*.smv;*.ymv;*.zmv;*.bkm;*.pjm;*.pxm",
|
||||||
"FCEUX", "*.fm2",
|
"FCEUX", "*.fm2",
|
||||||
"PCEjin/Mednafen", "*.mc2;*.mcm",
|
"PCEjin/Mednafen", "*.mc2;*.mcm",
|
||||||
"Dega", "*.mmv",
|
"Dega", "*.mmv",
|
||||||
|
@ -469,6 +469,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
"Snes9x", "*.smv",
|
"Snes9x", "*.smv",
|
||||||
"Yabause", "*.ymv",
|
"Yabause", "*.ymv",
|
||||||
"ZSNES", "*.zmv",
|
"ZSNES", "*.zmv",
|
||||||
|
"PSXjin", "*.pjm",
|
||||||
|
"PCSX", "*.pxm",
|
||||||
"BizHawk Bkm", "*.bkm",
|
"BizHawk Bkm", "*.bkm",
|
||||||
"All Files", "*.*"),
|
"All Files", "*.*"),
|
||||||
RestoreDirectory = false
|
RestoreDirectory = false
|
||||||
|
@ -1144,6 +1146,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
VirtualPadMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Virtual Pad"].Bindings;
|
VirtualPadMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Virtual Pad"].Bindings;
|
||||||
TraceLoggerMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Trace Logger"].Bindings;
|
TraceLoggerMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Trace Logger"].Bindings;
|
||||||
TraceLoggerMenuItem.Enabled = GlobalWin.Tools.IsAvailable<TraceLogger>();
|
TraceLoggerMenuItem.Enabled = GlobalWin.Tools.IsAvailable<TraceLogger>();
|
||||||
|
CodeDataLoggerMenuItem.Enabled = GlobalWin.Tools.IsAvailable<CDL>();
|
||||||
|
|
||||||
TAStudioMenuItem.Enabled = GlobalWin.Tools.IsAvailable<TAStudio>();
|
TAStudioMenuItem.Enabled = GlobalWin.Tools.IsAvailable<TAStudio>();
|
||||||
|
|
||||||
|
@ -1393,7 +1396,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void CodeDataLoggerMenuItem_Click(object sender, EventArgs e)
|
private void CodeDataLoggerMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GlobalWin.Tools.Load<PCECDL>();
|
GlobalWin.Tools.Load<CDL>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PCEAlwaysPerformSpriteLimitMenuItem_Click(object sender, EventArgs e)
|
private void PCEAlwaysPerformSpriteLimitMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -2616,8 +2619,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
else if (ext.ToUpper() == ".CDL" && Global.Emulator is PCEngine)
|
else if (ext.ToUpper() == ".CDL" && Global.Emulator is PCEngine)
|
||||||
{
|
{
|
||||||
GlobalWin.Tools.Load<PCECDL>();
|
GlobalWin.Tools.Load<CDL>();
|
||||||
(GlobalWin.Tools.Get<PCECDL>() as PCECDL).LoadFile(filePaths[0]);
|
(GlobalWin.Tools.Get<CDL>() as CDL).LoadFile(filePaths[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (MovieImport.IsValidMovieExtension(Path.GetExtension(filePaths[0])))
|
else if (MovieImport.IsValidMovieExtension(Path.GetExtension(filePaths[0])))
|
||||||
|
|
|
@ -144,6 +144,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// TODO - replace this with some kind of standard dictionary-yielding parser in a separate component
|
// TODO - replace this with some kind of standard dictionary-yielding parser in a separate component
|
||||||
string cmdRom = null;
|
string cmdRom = null;
|
||||||
string cmdLoadState = null;
|
string cmdLoadState = null;
|
||||||
|
string cmdLoadSlot = null;
|
||||||
string cmdMovie = null;
|
string cmdMovie = null;
|
||||||
string cmdDumpType = null;
|
string cmdDumpType = null;
|
||||||
string cmdDumpName = null;
|
string cmdDumpName = null;
|
||||||
|
@ -161,6 +162,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
var arg = args[i].ToLower();
|
var arg = args[i].ToLower();
|
||||||
if (arg.StartsWith("--load-slot="))
|
if (arg.StartsWith("--load-slot="))
|
||||||
|
{
|
||||||
|
cmdLoadSlot = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
|
}
|
||||||
|
if (arg.StartsWith("--load-state="))
|
||||||
{
|
{
|
||||||
cmdLoadState = arg.Substring(arg.IndexOf('=') + 1);
|
cmdLoadState = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
}
|
}
|
||||||
|
@ -401,14 +406,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdLoadState != null && !Global.Game.IsNullInstance)
|
if(!Global.Game.IsNullInstance)
|
||||||
{
|
{
|
||||||
LoadQuickSave("QuickSave" + cmdLoadState);
|
if(cmdLoadState != null)
|
||||||
|
{
|
||||||
|
LoadState(cmdLoadState,Path.GetFileName(cmdLoadState));
|
||||||
}
|
}
|
||||||
else if (Global.Config.AutoLoadLastSaveSlot && !Global.Game.IsNullInstance)
|
else if (cmdLoadSlot != null)
|
||||||
|
{
|
||||||
|
LoadQuickSave("QuickSave" + cmdLoadSlot);
|
||||||
|
}
|
||||||
|
else if (Global.Config.AutoLoadLastSaveSlot)
|
||||||
{
|
{
|
||||||
LoadQuickSave("QuickSave" + Global.Config.SaveSlot);
|
LoadQuickSave("QuickSave" + Global.Config.SaveSlot);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GlobalWin.Tools.AutoLoad();
|
GlobalWin.Tools.AutoLoad();
|
||||||
|
|
||||||
|
@ -600,8 +612,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (value == null) // TODO: make an Event handler instead, but the logic here is that after turbo seeking, tools will want to do a real update when the emulator finally pauses
|
if (value == null) // TODO: make an Event handler instead, but the logic here is that after turbo seeking, tools will want to do a real update when the emulator finally pauses
|
||||||
{
|
{
|
||||||
GlobalWin.Tools.UpdateToolsBefore();
|
bool skipScripts = !(Global.Config.TurboSeek && !Global.Config.RunLuaDuringTurbo);
|
||||||
GlobalWin.Tools.UpdateToolsAfter();
|
GlobalWin.Tools.UpdateToolsBefore(skipScripts);
|
||||||
|
GlobalWin.Tools.UpdateToolsAfter(skipScripts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -878,12 +891,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
string fname_bare = string.Format(fmt, prefix, ts, "");
|
string fname_bare = string.Format(fmt, prefix, ts, "");
|
||||||
string fname = string.Format(fmt, prefix, ts, " (0)");
|
string fname = string.Format(fmt, prefix, ts, " (0)");
|
||||||
|
|
||||||
//if this file already exists,
|
//if the (0) filename exists, do nothing. we'll bump up the number later
|
||||||
//1. move the original file to a numbered one (to keep a good filesystem sort ordering)
|
//if the bare filename exists, move it to (0)
|
||||||
if (File.Exists(fname_bare))
|
//otherwise, no related filename exists, and we can proceed with the bare filename
|
||||||
|
if (File.Exists(fname)) { }
|
||||||
|
else if (File.Exists(fname_bare))
|
||||||
File.Move(fname_bare, fname);
|
File.Move(fname_bare, fname);
|
||||||
else fname = fname_bare;
|
else fname = fname_bare;
|
||||||
//2. create next one sequentially named
|
|
||||||
int seq = 0;
|
int seq = 0;
|
||||||
while (File.Exists(fname))
|
while (File.Exists(fname))
|
||||||
{
|
{
|
||||||
|
@ -1344,7 +1358,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (_inResizeLoop)
|
if (_inResizeLoop)
|
||||||
{
|
{
|
||||||
var size = PresentationPanel.NativeSize;
|
var size = PresentationPanel.NativeSize;
|
||||||
str = str + string.Format("({0}x{1}) - ", size.Width, size.Height);
|
float AR = (float)size.Width / size.Height;
|
||||||
|
str = str + string.Format("({0}x{1})={2} - ", size.Width, size.Height, AR);
|
||||||
}
|
}
|
||||||
|
|
||||||
//we need to display FPS somewhere, in this case
|
//we need to display FPS somewhere, in this case
|
||||||
|
@ -3248,6 +3263,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
bbin = new BitmapBuffer(Global.Emulator.VideoProvider().BufferWidth, Global.Emulator.VideoProvider().BufferHeight, Global.Emulator.VideoProvider().GetVideoBuffer());
|
bbin = new BitmapBuffer(Global.Emulator.VideoProvider().BufferWidth, Global.Emulator.VideoProvider().BufferHeight, Global.Emulator.VideoProvider().GetVideoBuffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bbin.DiscardAlpha();
|
||||||
|
|
||||||
bmpout = new Bitmap(_avwriterResizew, _avwriterResizeh, PixelFormat.Format32bppArgb);
|
bmpout = new Bitmap(_avwriterResizew, _avwriterResizeh, PixelFormat.Format32bppArgb);
|
||||||
bmpin = bbin.ToSysdrawingBitmap();
|
bmpin = bbin.ToSysdrawingBitmap();
|
||||||
|
@ -3894,6 +3910,5 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BizHawk.Client.Common.TempFileCleaner.Start();
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
string iniPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config.ini");
|
string iniPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config.ini");
|
||||||
|
@ -198,14 +199,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
string message = e.ToString();
|
new ExceptionBox(e).ShowDialog();
|
||||||
if (e.InnerException != null)
|
|
||||||
{
|
|
||||||
message += "\n\nInner Exception:\n\n" + e.InnerException;
|
|
||||||
}
|
|
||||||
|
|
||||||
message += "\n\nStackTrace:\n" + e.StackTrace;
|
|
||||||
MessageBox.Show(message);
|
|
||||||
}
|
}
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
finally
|
finally
|
||||||
|
@ -220,7 +214,17 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
//cleanup:
|
||||||
|
//cleanup IGL stuff so we can get better refcounts when exiting process, for debugging
|
||||||
|
//DOESNT WORK FOR SOME REASON
|
||||||
|
//GlobalWin.IGL_GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK();
|
||||||
|
//GLManager.Instance.Dispose();
|
||||||
|
//if (GlobalWin.IGL_GL != GlobalWin.GL)
|
||||||
|
// GlobalWin.GL.Dispose();
|
||||||
|
//((IDisposable)GlobalWin.IGL_GL).Dispose();
|
||||||
|
|
||||||
|
} //SubMain
|
||||||
|
|
||||||
//declared here instead of a more usual place to avoid dependencies on the more usual place
|
//declared here instead of a more usual place to avoid dependencies on the more usual place
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -91,6 +91,10 @@
|
||||||
this.trackbarFrameSizeWindowed = new BizHawk.Client.EmuHawk.TransparentTrackBar();
|
this.trackbarFrameSizeWindowed = new BizHawk.Client.EmuHawk.TransparentTrackBar();
|
||||||
this.cbCaptionWindowed = new System.Windows.Forms.CheckBox();
|
this.cbCaptionWindowed = new System.Windows.Forms.CheckBox();
|
||||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.rbUseCustomRatio = new System.Windows.Forms.RadioButton();
|
||||||
|
this.txtCustomARY = new System.Windows.Forms.TextBox();
|
||||||
|
this.label12 = new System.Windows.Forms.Label();
|
||||||
|
this.txtCustomARX = new System.Windows.Forms.TextBox();
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.tbScanlineIntensity)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.tbScanlineIntensity)).BeginInit();
|
||||||
this.grpFinalFilter.SuspendLayout();
|
this.grpFinalFilter.SuspendLayout();
|
||||||
|
@ -246,7 +250,7 @@
|
||||||
// checkPadInteger
|
// checkPadInteger
|
||||||
//
|
//
|
||||||
this.checkPadInteger.AutoSize = true;
|
this.checkPadInteger.AutoSize = true;
|
||||||
this.checkPadInteger.Location = new System.Drawing.Point(15, 284);
|
this.checkPadInteger.Location = new System.Drawing.Point(15, 307);
|
||||||
this.checkPadInteger.Name = "checkPadInteger";
|
this.checkPadInteger.Name = "checkPadInteger";
|
||||||
this.checkPadInteger.Size = new System.Drawing.Size(248, 17);
|
this.checkPadInteger.Size = new System.Drawing.Size(248, 17);
|
||||||
this.checkPadInteger.TabIndex = 9;
|
this.checkPadInteger.TabIndex = 9;
|
||||||
|
@ -325,6 +329,10 @@
|
||||||
//
|
//
|
||||||
// grpARSelection
|
// grpARSelection
|
||||||
//
|
//
|
||||||
|
this.grpARSelection.Controls.Add(this.txtCustomARY);
|
||||||
|
this.grpARSelection.Controls.Add(this.label12);
|
||||||
|
this.grpARSelection.Controls.Add(this.txtCustomARX);
|
||||||
|
this.grpARSelection.Controls.Add(this.rbUseCustomRatio);
|
||||||
this.grpARSelection.Controls.Add(this.label4);
|
this.grpARSelection.Controls.Add(this.label4);
|
||||||
this.grpARSelection.Controls.Add(this.txtCustomARHeight);
|
this.grpARSelection.Controls.Add(this.txtCustomARHeight);
|
||||||
this.grpARSelection.Controls.Add(this.label3);
|
this.grpARSelection.Controls.Add(this.label3);
|
||||||
|
@ -334,7 +342,7 @@
|
||||||
this.grpARSelection.Controls.Add(this.rbUseSystem);
|
this.grpARSelection.Controls.Add(this.rbUseSystem);
|
||||||
this.grpARSelection.Location = new System.Drawing.Point(15, 171);
|
this.grpARSelection.Location = new System.Drawing.Point(15, 171);
|
||||||
this.grpARSelection.Name = "grpARSelection";
|
this.grpARSelection.Name = "grpARSelection";
|
||||||
this.grpARSelection.Size = new System.Drawing.Size(377, 107);
|
this.grpARSelection.Size = new System.Drawing.Size(377, 130);
|
||||||
this.grpARSelection.TabIndex = 13;
|
this.grpARSelection.TabIndex = 13;
|
||||||
this.grpARSelection.TabStop = false;
|
this.grpARSelection.TabStop = false;
|
||||||
this.grpARSelection.Text = "Aspect Ratio Selection";
|
this.grpARSelection.Text = "Aspect Ratio Selection";
|
||||||
|
@ -376,10 +384,10 @@
|
||||||
this.rbUseCustom.AutoSize = true;
|
this.rbUseCustom.AutoSize = true;
|
||||||
this.rbUseCustom.Location = new System.Drawing.Point(26, 80);
|
this.rbUseCustom.Location = new System.Drawing.Point(26, 80);
|
||||||
this.rbUseCustom.Name = "rbUseCustom";
|
this.rbUseCustom.Name = "rbUseCustom";
|
||||||
this.rbUseCustom.Size = new System.Drawing.Size(107, 17);
|
this.rbUseCustom.Size = new System.Drawing.Size(105, 17);
|
||||||
this.rbUseCustom.TabIndex = 13;
|
this.rbUseCustom.TabIndex = 13;
|
||||||
this.rbUseCustom.TabStop = true;
|
this.rbUseCustom.TabStop = true;
|
||||||
this.rbUseCustom.Text = "Use custom Size:";
|
this.rbUseCustom.Text = "Use custom size:";
|
||||||
this.rbUseCustom.UseVisualStyleBackColor = true;
|
this.rbUseCustom.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
|
@ -798,6 +806,40 @@
|
||||||
this.linkLabel1.Text = "Documentation";
|
this.linkLabel1.Text = "Documentation";
|
||||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||||
//
|
//
|
||||||
|
// rbUseCustomRatio
|
||||||
|
//
|
||||||
|
this.rbUseCustomRatio.AutoSize = true;
|
||||||
|
this.rbUseCustomRatio.Location = new System.Drawing.Point(26, 103);
|
||||||
|
this.rbUseCustomRatio.Name = "rbUseCustomRatio";
|
||||||
|
this.rbUseCustomRatio.Size = new System.Drawing.Size(102, 17);
|
||||||
|
this.rbUseCustomRatio.TabIndex = 16;
|
||||||
|
this.rbUseCustomRatio.TabStop = true;
|
||||||
|
this.rbUseCustomRatio.Text = "Use custom AR:";
|
||||||
|
this.rbUseCustomRatio.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// txtCustomARY
|
||||||
|
//
|
||||||
|
this.txtCustomARY.Location = new System.Drawing.Point(230, 102);
|
||||||
|
this.txtCustomARY.Name = "txtCustomARY";
|
||||||
|
this.txtCustomARY.Size = new System.Drawing.Size(72, 20);
|
||||||
|
this.txtCustomARY.TabIndex = 19;
|
||||||
|
//
|
||||||
|
// label12
|
||||||
|
//
|
||||||
|
this.label12.AutoSize = true;
|
||||||
|
this.label12.Location = new System.Drawing.Point(212, 107);
|
||||||
|
this.label12.Name = "label12";
|
||||||
|
this.label12.Size = new System.Drawing.Size(10, 13);
|
||||||
|
this.label12.TabIndex = 17;
|
||||||
|
this.label12.Text = ":";
|
||||||
|
//
|
||||||
|
// txtCustomARX
|
||||||
|
//
|
||||||
|
this.txtCustomARX.Location = new System.Drawing.Point(134, 102);
|
||||||
|
this.txtCustomARX.Name = "txtCustomARX";
|
||||||
|
this.txtCustomARX.Size = new System.Drawing.Size(72, 20);
|
||||||
|
this.txtCustomARX.TabIndex = 18;
|
||||||
|
//
|
||||||
// DisplayConfigLite
|
// DisplayConfigLite
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.btnOk;
|
this.AcceptButton = this.btnOk;
|
||||||
|
@ -907,5 +949,9 @@
|
||||||
private System.Windows.Forms.RadioButton rbDisplayFull;
|
private System.Windows.Forms.RadioButton rbDisplayFull;
|
||||||
private System.Windows.Forms.CheckBox cbAllowDoubleclickFullscreen;
|
private System.Windows.Forms.CheckBox cbAllowDoubleclickFullscreen;
|
||||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||||
|
private System.Windows.Forms.RadioButton rbUseCustomRatio;
|
||||||
|
private System.Windows.Forms.TextBox txtCustomARY;
|
||||||
|
private System.Windows.Forms.Label label12;
|
||||||
|
private System.Windows.Forms.TextBox txtCustomARX;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -76,9 +76,17 @@ namespace BizHawk.Client.EmuHawk.config
|
||||||
rbUseSystem.Checked = true;
|
rbUseSystem.Checked = true;
|
||||||
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
|
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
|
||||||
rbUseCustom.Checked = true;
|
rbUseCustom.Checked = true;
|
||||||
|
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
|
||||||
|
rbUseCustomRatio.Checked = true;
|
||||||
|
|
||||||
|
if(Global.Config.DispCustomUserARWidth != -1)
|
||||||
txtCustomARWidth.Text = Global.Config.DispCustomUserARWidth.ToString();
|
txtCustomARWidth.Text = Global.Config.DispCustomUserARWidth.ToString();
|
||||||
|
if (Global.Config.DispCustomUserARHeight != -1)
|
||||||
txtCustomARHeight.Text = Global.Config.DispCustomUserARHeight.ToString();
|
txtCustomARHeight.Text = Global.Config.DispCustomUserARHeight.ToString();
|
||||||
|
if (Global.Config.DispCustomUserARX != -1)
|
||||||
|
txtCustomARX.Text = Global.Config.DispCustomUserARX.ToString();
|
||||||
|
if (Global.Config.DispCustomUserARY != -1)
|
||||||
|
txtCustomARY.Text = Global.Config.DispCustomUserARY.ToString();
|
||||||
|
|
||||||
RefreshAspectRatioOptions();
|
RefreshAspectRatioOptions();
|
||||||
}
|
}
|
||||||
|
@ -141,9 +149,21 @@ namespace BizHawk.Client.EmuHawk.config
|
||||||
Global.Config.DispManagerAR = Config.EDispManagerAR.System;
|
Global.Config.DispManagerAR = Config.EDispManagerAR.System;
|
||||||
else if (rbUseCustom.Checked)
|
else if (rbUseCustom.Checked)
|
||||||
Global.Config.DispManagerAR = Config.EDispManagerAR.Custom;
|
Global.Config.DispManagerAR = Config.EDispManagerAR.Custom;
|
||||||
|
else if (rbUseCustomRatio.Checked)
|
||||||
|
Global.Config.DispManagerAR = Config.EDispManagerAR.CustomRatio;
|
||||||
|
|
||||||
|
if (txtCustomARWidth.Text != "")
|
||||||
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
|
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
|
||||||
|
else Global.Config.DispCustomUserARWidth = -1;
|
||||||
|
if (txtCustomARHeight.Text != "")
|
||||||
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
|
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
|
||||||
|
else Global.Config.DispCustomUserARHeight = -1;
|
||||||
|
if (txtCustomARX.Text != "")
|
||||||
|
float.TryParse(txtCustomARX.Text, out Global.Config.DispCustomUserARX);
|
||||||
|
else Global.Config.DispCustomUserARX = -1;
|
||||||
|
if (txtCustomARY.Text != "")
|
||||||
|
float.TryParse(txtCustomARY.Text, out Global.Config.DispCustomUserARY);
|
||||||
|
else Global.Config.DispCustomUserARY = -1;
|
||||||
|
|
||||||
var oldDisplayMethod = Global.Config.DispMethod;
|
var oldDisplayMethod = Global.Config.DispMethod;
|
||||||
if(rbOpenGL.Checked)
|
if(rbOpenGL.Checked)
|
||||||
|
@ -176,7 +196,34 @@ namespace BizHawk.Client.EmuHawk.config
|
||||||
if (ofd.ShowDialog() == DialogResult.OK)
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
rbUser.Checked = true;
|
rbUser.Checked = true;
|
||||||
PathSelection = Path.GetFullPath(ofd.FileName);
|
var choice = Path.GetFullPath(ofd.FileName);
|
||||||
|
|
||||||
|
//test the preset
|
||||||
|
using (var stream = File.OpenRead(choice))
|
||||||
|
{
|
||||||
|
var cgp = new BizHawk.Client.EmuHawk.Filters.RetroShaderPreset(stream);
|
||||||
|
if (cgp.ContainsGLSL)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Specified CGP contains references to .glsl files. This is illegal. Use .cg");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//try compiling it
|
||||||
|
bool ok = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var filter = new BizHawk.Client.EmuHawk.Filters.RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
|
||||||
|
ok = filter.Available;
|
||||||
|
}
|
||||||
|
catch {}
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Selected filter could not be compiled.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PathSelection = choice;
|
||||||
RefreshState();
|
RefreshState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,8 +257,7 @@ namespace BizHawk.Client.EmuHawk.config
|
||||||
{
|
{
|
||||||
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
||||||
int scanlines = Global.Config.TargetScanlineFilterIntensity;
|
int scanlines = Global.Config.TargetScanlineFilterIntensity;
|
||||||
float percentage = (float) scanlines / 255 * 100;
|
float percentage = (float) scanlines / 256 * 100;
|
||||||
if (percentage > 100) percentage = 100;
|
|
||||||
lblScanlines.Text = String.Format("{0:F2}", percentage) + "%";
|
lblScanlines.Text = String.Format("{0:F2}", percentage) + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -559,6 +559,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (didSomething) DoScan();
|
if (didSomething) DoScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||||
|
{
|
||||||
|
if (keyData == Keys.Escape)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
|
}
|
||||||
|
|
||||||
private void lvFirmwares_DragEnter(object sender, DragEventArgs e)
|
private void lvFirmwares_DragEnter(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(N64VideoPluginconfig));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(N64VideoPluginconfig));
|
||||||
this.N64plugintabcontrol = new System.Windows.Forms.TabControl();
|
this.N64plugintabcontrol = new System.Windows.Forms.TabControl();
|
||||||
this.N64vpluginglobaltab = new System.Windows.Forms.TabPage();
|
this.N64vpluginglobaltab = new System.Windows.Forms.TabPage();
|
||||||
|
this.VideoResolutionYTextBox = new System.Windows.Forms.TextBox();
|
||||||
this.LabelVideoResolutionY = new System.Windows.Forms.Label();
|
this.LabelVideoResolutionY = new System.Windows.Forms.Label();
|
||||||
|
this.VideoResolutionXTextBox = new System.Windows.Forms.TextBox();
|
||||||
this.LabelVideoResolutionX = new System.Windows.Forms.Label();
|
this.LabelVideoResolutionX = new System.Windows.Forms.Label();
|
||||||
this.label49 = new System.Windows.Forms.Label();
|
this.label49 = new System.Windows.Forms.Label();
|
||||||
this.RspTypeDropdown = new System.Windows.Forms.ComboBox();
|
this.RspTypeDropdown = new System.Windows.Forms.ComboBox();
|
||||||
|
@ -275,6 +277,8 @@
|
||||||
this.Glide64mk2_UseDefaultHacks2 = new System.Windows.Forms.CheckBox();
|
this.Glide64mk2_UseDefaultHacks2 = new System.Windows.Forms.CheckBox();
|
||||||
this.JaboTab = new System.Windows.Forms.TabPage();
|
this.JaboTab = new System.Windows.Forms.TabPage();
|
||||||
this.JaboPerGameHacksGroupBox = new System.Windows.Forms.GroupBox();
|
this.JaboPerGameHacksGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.JaboResolutionHeightBox = new BizHawk.Client.EmuHawk.WatchValueBox();
|
||||||
|
this.JaboResolutionWidthBox = new BizHawk.Client.EmuHawk.WatchValueBox();
|
||||||
this.label71 = new System.Windows.Forms.Label();
|
this.label71 = new System.Windows.Forms.Label();
|
||||||
this.label70 = new System.Windows.Forms.Label();
|
this.label70 = new System.Windows.Forms.Label();
|
||||||
this.JaboClearModeDropDown = new System.Windows.Forms.ComboBox();
|
this.JaboClearModeDropDown = new System.Windows.Forms.ComboBox();
|
||||||
|
@ -306,10 +310,6 @@
|
||||||
this.SaveButton = new System.Windows.Forms.Button();
|
this.SaveButton = new System.Windows.Forms.Button();
|
||||||
this.CancelBT = new System.Windows.Forms.Button();
|
this.CancelBT = new System.Windows.Forms.Button();
|
||||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.VideoResolutionYTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.VideoResolutionXTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.JaboResolutionHeightBox = new BizHawk.Client.EmuHawk.WatchValueBox();
|
|
||||||
this.JaboResolutionWidthBox = new BizHawk.Client.EmuHawk.WatchValueBox();
|
|
||||||
this.N64plugintabcontrol.SuspendLayout();
|
this.N64plugintabcontrol.SuspendLayout();
|
||||||
this.N64vpluginglobaltab.SuspendLayout();
|
this.N64vpluginglobaltab.SuspendLayout();
|
||||||
this.RiceTabPage.SuspendLayout();
|
this.RiceTabPage.SuspendLayout();
|
||||||
|
@ -374,6 +374,16 @@
|
||||||
this.N64vpluginglobaltab.Text = "Global";
|
this.N64vpluginglobaltab.Text = "Global";
|
||||||
this.N64vpluginglobaltab.UseVisualStyleBackColor = true;
|
this.N64vpluginglobaltab.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// VideoResolutionYTextBox
|
||||||
|
//
|
||||||
|
this.VideoResolutionYTextBox.Location = new System.Drawing.Point(66, 270);
|
||||||
|
this.VideoResolutionYTextBox.MaxLength = 5;
|
||||||
|
this.VideoResolutionYTextBox.Name = "VideoResolutionYTextBox";
|
||||||
|
this.VideoResolutionYTextBox.Size = new System.Drawing.Size(35, 20);
|
||||||
|
this.VideoResolutionYTextBox.TabIndex = 22;
|
||||||
|
this.VideoResolutionYTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||||
|
this.VideoResolutionYTextBox.Visible = false;
|
||||||
|
//
|
||||||
// LabelVideoResolutionY
|
// LabelVideoResolutionY
|
||||||
//
|
//
|
||||||
this.LabelVideoResolutionY.AutoSize = true;
|
this.LabelVideoResolutionY.AutoSize = true;
|
||||||
|
@ -384,6 +394,16 @@
|
||||||
this.LabelVideoResolutionY.Text = "Height:";
|
this.LabelVideoResolutionY.Text = "Height:";
|
||||||
this.LabelVideoResolutionY.Visible = false;
|
this.LabelVideoResolutionY.Visible = false;
|
||||||
//
|
//
|
||||||
|
// VideoResolutionXTextBox
|
||||||
|
//
|
||||||
|
this.VideoResolutionXTextBox.Location = new System.Drawing.Point(66, 244);
|
||||||
|
this.VideoResolutionXTextBox.MaxLength = 5;
|
||||||
|
this.VideoResolutionXTextBox.Name = "VideoResolutionXTextBox";
|
||||||
|
this.VideoResolutionXTextBox.Size = new System.Drawing.Size(35, 20);
|
||||||
|
this.VideoResolutionXTextBox.TabIndex = 20;
|
||||||
|
this.VideoResolutionXTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||||
|
this.VideoResolutionXTextBox.Visible = false;
|
||||||
|
//
|
||||||
// LabelVideoResolutionX
|
// LabelVideoResolutionX
|
||||||
//
|
//
|
||||||
this.LabelVideoResolutionX.AutoSize = true;
|
this.LabelVideoResolutionX.AutoSize = true;
|
||||||
|
@ -3324,6 +3344,32 @@
|
||||||
this.JaboPerGameHacksGroupBox.TabStop = false;
|
this.JaboPerGameHacksGroupBox.TabStop = false;
|
||||||
this.JaboPerGameHacksGroupBox.Text = "Per game settings";
|
this.JaboPerGameHacksGroupBox.Text = "Per game settings";
|
||||||
//
|
//
|
||||||
|
// JaboResolutionHeightBox
|
||||||
|
//
|
||||||
|
this.JaboResolutionHeightBox.ByteSize = BizHawk.Client.Common.Watch.WatchSize.Byte;
|
||||||
|
this.JaboResolutionHeightBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
|
this.JaboResolutionHeightBox.Location = new System.Drawing.Point(127, 90);
|
||||||
|
this.JaboResolutionHeightBox.MaxLength = 4;
|
||||||
|
this.JaboResolutionHeightBox.Name = "JaboResolutionHeightBox";
|
||||||
|
this.JaboResolutionHeightBox.Nullable = false;
|
||||||
|
this.JaboResolutionHeightBox.Size = new System.Drawing.Size(52, 20);
|
||||||
|
this.JaboResolutionHeightBox.TabIndex = 34;
|
||||||
|
this.JaboResolutionHeightBox.Text = "0";
|
||||||
|
this.JaboResolutionHeightBox.Type = BizHawk.Client.Common.Watch.DisplayType.Signed;
|
||||||
|
//
|
||||||
|
// JaboResolutionWidthBox
|
||||||
|
//
|
||||||
|
this.JaboResolutionWidthBox.ByteSize = BizHawk.Client.Common.Watch.WatchSize.Byte;
|
||||||
|
this.JaboResolutionWidthBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
|
this.JaboResolutionWidthBox.Location = new System.Drawing.Point(127, 60);
|
||||||
|
this.JaboResolutionWidthBox.MaxLength = 4;
|
||||||
|
this.JaboResolutionWidthBox.Name = "JaboResolutionWidthBox";
|
||||||
|
this.JaboResolutionWidthBox.Nullable = false;
|
||||||
|
this.JaboResolutionWidthBox.Size = new System.Drawing.Size(52, 20);
|
||||||
|
this.JaboResolutionWidthBox.TabIndex = 33;
|
||||||
|
this.JaboResolutionWidthBox.Text = "0";
|
||||||
|
this.JaboResolutionWidthBox.Type = BizHawk.Client.Common.Watch.DisplayType.Signed;
|
||||||
|
//
|
||||||
// label71
|
// label71
|
||||||
//
|
//
|
||||||
this.label71.AutoSize = true;
|
this.label71.AutoSize = true;
|
||||||
|
@ -3627,52 +3673,6 @@
|
||||||
this.toolTip1.ReshowDelay = 100;
|
this.toolTip1.ReshowDelay = 100;
|
||||||
this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
|
this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
|
||||||
//
|
//
|
||||||
// VideoResolutionYTextBox
|
|
||||||
//
|
|
||||||
this.VideoResolutionYTextBox.Location = new System.Drawing.Point(66, 270);
|
|
||||||
this.VideoResolutionYTextBox.MaxLength = 5;
|
|
||||||
this.VideoResolutionYTextBox.Name = "VideoResolutionYTextBox";
|
|
||||||
this.VideoResolutionYTextBox.Size = new System.Drawing.Size(35, 20);
|
|
||||||
this.VideoResolutionYTextBox.TabIndex = 22;
|
|
||||||
this.VideoResolutionYTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
|
||||||
this.VideoResolutionYTextBox.Visible = false;
|
|
||||||
//
|
|
||||||
// VideoResolutionXTextBox
|
|
||||||
//
|
|
||||||
this.VideoResolutionXTextBox.Location = new System.Drawing.Point(66, 244);
|
|
||||||
this.VideoResolutionXTextBox.MaxLength = 5;
|
|
||||||
this.VideoResolutionXTextBox.Name = "VideoResolutionXTextBox";
|
|
||||||
this.VideoResolutionXTextBox.Size = new System.Drawing.Size(35, 20);
|
|
||||||
this.VideoResolutionXTextBox.TabIndex = 20;
|
|
||||||
this.VideoResolutionXTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
|
||||||
this.VideoResolutionXTextBox.Visible = false;
|
|
||||||
//
|
|
||||||
// JaboResolutionHeightBox
|
|
||||||
//
|
|
||||||
this.JaboResolutionHeightBox.ByteSize = BizHawk.Client.Common.Watch.WatchSize.Byte;
|
|
||||||
this.JaboResolutionHeightBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
|
||||||
this.JaboResolutionHeightBox.Location = new System.Drawing.Point(127, 90);
|
|
||||||
this.JaboResolutionHeightBox.MaxLength = 4;
|
|
||||||
this.JaboResolutionHeightBox.Name = "JaboResolutionHeightBox";
|
|
||||||
this.JaboResolutionHeightBox.Nullable = false;
|
|
||||||
this.JaboResolutionHeightBox.Size = new System.Drawing.Size(52, 20);
|
|
||||||
this.JaboResolutionHeightBox.TabIndex = 34;
|
|
||||||
this.JaboResolutionHeightBox.Text = "0";
|
|
||||||
this.JaboResolutionHeightBox.Type = BizHawk.Client.Common.Watch.DisplayType.Signed;
|
|
||||||
//
|
|
||||||
// JaboResolutionWidthBox
|
|
||||||
//
|
|
||||||
this.JaboResolutionWidthBox.ByteSize = BizHawk.Client.Common.Watch.WatchSize.Byte;
|
|
||||||
this.JaboResolutionWidthBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
|
||||||
this.JaboResolutionWidthBox.Location = new System.Drawing.Point(127, 60);
|
|
||||||
this.JaboResolutionWidthBox.MaxLength = 4;
|
|
||||||
this.JaboResolutionWidthBox.Name = "JaboResolutionWidthBox";
|
|
||||||
this.JaboResolutionWidthBox.Nullable = false;
|
|
||||||
this.JaboResolutionWidthBox.Size = new System.Drawing.Size(52, 20);
|
|
||||||
this.JaboResolutionWidthBox.TabIndex = 33;
|
|
||||||
this.JaboResolutionWidthBox.Text = "0";
|
|
||||||
this.JaboResolutionWidthBox.Type = BizHawk.Client.Common.Watch.DisplayType.Signed;
|
|
||||||
//
|
|
||||||
// N64VideoPluginconfig
|
// N64VideoPluginconfig
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.SaveButton;
|
this.AcceptButton = this.SaveButton;
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewN64PluginSettings));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewN64PluginSettings));
|
||||||
this.PluginTabs = new System.Windows.Forms.TabControl();
|
this.PluginTabs = new System.Windows.Forms.TabControl();
|
||||||
this.GlobalTab = new System.Windows.Forms.TabPage();
|
this.GlobalTab = new System.Windows.Forms.TabPage();
|
||||||
|
this.VideoResolutionYTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.LabelVideoResolutionY = new System.Windows.Forms.Label();
|
||||||
this.VideoResolutionXTextBox = new System.Windows.Forms.TextBox();
|
this.VideoResolutionXTextBox = new System.Windows.Forms.TextBox();
|
||||||
this.LabelVideoResolutionX = new System.Windows.Forms.Label();
|
this.LabelVideoResolutionX = new System.Windows.Forms.Label();
|
||||||
this.label49 = new System.Windows.Forms.Label();
|
this.label49 = new System.Windows.Forms.Label();
|
||||||
|
@ -51,8 +53,6 @@
|
||||||
this.JaboPropertyGrid = new System.Windows.Forms.PropertyGrid();
|
this.JaboPropertyGrid = new System.Windows.Forms.PropertyGrid();
|
||||||
this.SaveBtn = new System.Windows.Forms.Button();
|
this.SaveBtn = new System.Windows.Forms.Button();
|
||||||
this.CancelBtn = new System.Windows.Forms.Button();
|
this.CancelBtn = new System.Windows.Forms.Button();
|
||||||
this.LabelVideoResolutionY = new System.Windows.Forms.Label();
|
|
||||||
this.VideoResolutionYTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.PluginTabs.SuspendLayout();
|
this.PluginTabs.SuspendLayout();
|
||||||
this.GlobalTab.SuspendLayout();
|
this.GlobalTab.SuspendLayout();
|
||||||
this.RiceTab.SuspendLayout();
|
this.RiceTab.SuspendLayout();
|
||||||
|
@ -99,6 +99,26 @@
|
||||||
this.GlobalTab.Text = "Global";
|
this.GlobalTab.Text = "Global";
|
||||||
this.GlobalTab.UseVisualStyleBackColor = true;
|
this.GlobalTab.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// VideoResolutionYTextBox
|
||||||
|
//
|
||||||
|
this.VideoResolutionYTextBox.Location = new System.Drawing.Point(494, 91);
|
||||||
|
this.VideoResolutionYTextBox.MaxLength = 5;
|
||||||
|
this.VideoResolutionYTextBox.Name = "VideoResolutionYTextBox";
|
||||||
|
this.VideoResolutionYTextBox.Size = new System.Drawing.Size(35, 20);
|
||||||
|
this.VideoResolutionYTextBox.TabIndex = 108;
|
||||||
|
this.VideoResolutionYTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||||
|
this.VideoResolutionYTextBox.Visible = false;
|
||||||
|
//
|
||||||
|
// LabelVideoResolutionY
|
||||||
|
//
|
||||||
|
this.LabelVideoResolutionY.AutoSize = true;
|
||||||
|
this.LabelVideoResolutionY.Location = new System.Drawing.Point(447, 94);
|
||||||
|
this.LabelVideoResolutionY.Name = "LabelVideoResolutionY";
|
||||||
|
this.LabelVideoResolutionY.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.LabelVideoResolutionY.TabIndex = 107;
|
||||||
|
this.LabelVideoResolutionY.Text = "Height:";
|
||||||
|
this.LabelVideoResolutionY.Visible = false;
|
||||||
|
//
|
||||||
// VideoResolutionXTextBox
|
// VideoResolutionXTextBox
|
||||||
//
|
//
|
||||||
this.VideoResolutionXTextBox.Location = new System.Drawing.Point(402, 91);
|
this.VideoResolutionXTextBox.Location = new System.Drawing.Point(402, 91);
|
||||||
|
@ -233,6 +253,7 @@
|
||||||
//
|
//
|
||||||
// RicePropertyGrid
|
// RicePropertyGrid
|
||||||
//
|
//
|
||||||
|
this.RicePropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||||
this.RicePropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.RicePropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.RicePropertyGrid.Location = new System.Drawing.Point(3, 3);
|
this.RicePropertyGrid.Location = new System.Drawing.Point(3, 3);
|
||||||
this.RicePropertyGrid.Name = "RicePropertyGrid";
|
this.RicePropertyGrid.Name = "RicePropertyGrid";
|
||||||
|
@ -253,6 +274,7 @@
|
||||||
//
|
//
|
||||||
// Glidemk2PropertyGrid
|
// Glidemk2PropertyGrid
|
||||||
//
|
//
|
||||||
|
this.Glidemk2PropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||||
this.Glidemk2PropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.Glidemk2PropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.Glidemk2PropertyGrid.Location = new System.Drawing.Point(0, 0);
|
this.Glidemk2PropertyGrid.Location = new System.Drawing.Point(0, 0);
|
||||||
this.Glidemk2PropertyGrid.Name = "Glidemk2PropertyGrid";
|
this.Glidemk2PropertyGrid.Name = "Glidemk2PropertyGrid";
|
||||||
|
@ -273,6 +295,7 @@
|
||||||
//
|
//
|
||||||
// GlidePropertyGrid
|
// GlidePropertyGrid
|
||||||
//
|
//
|
||||||
|
this.GlidePropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||||
this.GlidePropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.GlidePropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.GlidePropertyGrid.Location = new System.Drawing.Point(0, 0);
|
this.GlidePropertyGrid.Location = new System.Drawing.Point(0, 0);
|
||||||
this.GlidePropertyGrid.Name = "GlidePropertyGrid";
|
this.GlidePropertyGrid.Name = "GlidePropertyGrid";
|
||||||
|
@ -293,6 +316,7 @@
|
||||||
//
|
//
|
||||||
// JaboPropertyGrid
|
// JaboPropertyGrid
|
||||||
//
|
//
|
||||||
|
this.JaboPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||||
this.JaboPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.JaboPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.JaboPropertyGrid.Location = new System.Drawing.Point(0, 0);
|
this.JaboPropertyGrid.Location = new System.Drawing.Point(0, 0);
|
||||||
this.JaboPropertyGrid.Name = "JaboPropertyGrid";
|
this.JaboPropertyGrid.Name = "JaboPropertyGrid";
|
||||||
|
@ -324,26 +348,6 @@
|
||||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
this.CancelBtn.UseVisualStyleBackColor = true;
|
||||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||||
//
|
//
|
||||||
// LabelVideoResolutionY
|
|
||||||
//
|
|
||||||
this.LabelVideoResolutionY.AutoSize = true;
|
|
||||||
this.LabelVideoResolutionY.Location = new System.Drawing.Point(447, 94);
|
|
||||||
this.LabelVideoResolutionY.Name = "LabelVideoResolutionY";
|
|
||||||
this.LabelVideoResolutionY.Size = new System.Drawing.Size(41, 13);
|
|
||||||
this.LabelVideoResolutionY.TabIndex = 107;
|
|
||||||
this.LabelVideoResolutionY.Text = "Height:";
|
|
||||||
this.LabelVideoResolutionY.Visible = false;
|
|
||||||
//
|
|
||||||
// VideoResolutionYTextBox
|
|
||||||
//
|
|
||||||
this.VideoResolutionYTextBox.Location = new System.Drawing.Point(494, 91);
|
|
||||||
this.VideoResolutionYTextBox.MaxLength = 5;
|
|
||||||
this.VideoResolutionYTextBox.Name = "VideoResolutionYTextBox";
|
|
||||||
this.VideoResolutionYTextBox.Size = new System.Drawing.Size(35, 20);
|
|
||||||
this.VideoResolutionYTextBox.TabIndex = 108;
|
|
||||||
this.VideoResolutionYTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
|
||||||
this.VideoResolutionYTextBox.Visible = false;
|
|
||||||
//
|
|
||||||
// NewN64PluginSettings
|
// NewN64PluginSettings
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
|
|
@ -52,8 +52,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
var combo = combos[i];
|
var combo = combos[i];
|
||||||
if (user.Devices8[i] == OctoshockDll.ePeripheralType.None) combo.SelectedIndex = 0;
|
if (user.Devices8[i] == OctoshockDll.ePeripheralType.None) combo.SelectedIndex = 0;
|
||||||
if (user.Devices8[i] == OctoshockDll.ePeripheralType.DualAnalog) combo.SelectedIndex = 1;
|
if (user.Devices8[i] == OctoshockDll.ePeripheralType.Pad) combo.SelectedIndex = 1;
|
||||||
if (user.Devices8[i] == OctoshockDll.ePeripheralType.DualShock) combo.SelectedIndex = 2;
|
if (user.Devices8[i] == OctoshockDll.ePeripheralType.DualShock) combo.SelectedIndex = 2;
|
||||||
|
if (user.Devices8[i] == OctoshockDll.ePeripheralType.DualAnalog) combo.SelectedIndex = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,8 +73,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
var combo = combos[i];
|
var combo = combos[i];
|
||||||
if (combo.SelectedIndex == 0) uc.Devices8[i] = OctoshockDll.ePeripheralType.None;
|
if (combo.SelectedIndex == 0) uc.Devices8[i] = OctoshockDll.ePeripheralType.None;
|
||||||
if (combo.SelectedIndex == 1) uc.Devices8[i] = OctoshockDll.ePeripheralType.DualAnalog;
|
if (combo.SelectedIndex == 1) uc.Devices8[i] = OctoshockDll.ePeripheralType.Pad;
|
||||||
if (combo.SelectedIndex == 2) uc.Devices8[i] = OctoshockDll.ePeripheralType.DualShock;
|
if (combo.SelectedIndex == 2) uc.Devices8[i] = OctoshockDll.ePeripheralType.DualShock;
|
||||||
|
if (combo.SelectedIndex == 3) uc.Devices8[i] = OctoshockDll.ePeripheralType.DualAnalog;
|
||||||
}
|
}
|
||||||
|
|
||||||
return uc;
|
return uc;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 790 B |
Binary file not shown.
After Width: | Height: | Size: 807 B |
|
@ -76,6 +76,10 @@
|
||||||
this.AttemptsLabel = new System.Windows.Forms.Label();
|
this.AttemptsLabel = new System.Windows.Forms.Label();
|
||||||
this.FramesLabel = new System.Windows.Forms.Label();
|
this.FramesLabel = new System.Windows.Forms.Label();
|
||||||
this.GoalGroupBox = new System.Windows.Forms.GroupBox();
|
this.GoalGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.Tiebreak3Operator = new System.Windows.Forms.ComboBox();
|
||||||
|
this.Tiebreak2Operator = new System.Windows.Forms.ComboBox();
|
||||||
|
this.Tiebreak1Operator = new System.Windows.Forms.ComboBox();
|
||||||
|
this.mainOperator = new System.Windows.Forms.ComboBox();
|
||||||
this.label12 = new System.Windows.Forms.Label();
|
this.label12 = new System.Windows.Forms.Label();
|
||||||
this.label11 = new System.Windows.Forms.Label();
|
this.label11 = new System.Windows.Forms.Label();
|
||||||
this.label10 = new System.Windows.Forms.Label();
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
@ -242,21 +246,21 @@
|
||||||
// _1ByteMenuItem
|
// _1ByteMenuItem
|
||||||
//
|
//
|
||||||
this._1ByteMenuItem.Name = "_1ByteMenuItem";
|
this._1ByteMenuItem.Name = "_1ByteMenuItem";
|
||||||
this._1ByteMenuItem.Size = new System.Drawing.Size(152, 22);
|
this._1ByteMenuItem.Size = new System.Drawing.Size(111, 22);
|
||||||
this._1ByteMenuItem.Text = "1 Byte";
|
this._1ByteMenuItem.Text = "1 Byte";
|
||||||
this._1ByteMenuItem.Click += new System.EventHandler(this._1ByteMenuItem_Click);
|
this._1ByteMenuItem.Click += new System.EventHandler(this._1ByteMenuItem_Click);
|
||||||
//
|
//
|
||||||
// _2ByteMenuItem
|
// _2ByteMenuItem
|
||||||
//
|
//
|
||||||
this._2ByteMenuItem.Name = "_2ByteMenuItem";
|
this._2ByteMenuItem.Name = "_2ByteMenuItem";
|
||||||
this._2ByteMenuItem.Size = new System.Drawing.Size(152, 22);
|
this._2ByteMenuItem.Size = new System.Drawing.Size(111, 22);
|
||||||
this._2ByteMenuItem.Text = "2 Bytes";
|
this._2ByteMenuItem.Text = "2 Bytes";
|
||||||
this._2ByteMenuItem.Click += new System.EventHandler(this._2ByteMenuItem_Click);
|
this._2ByteMenuItem.Click += new System.EventHandler(this._2ByteMenuItem_Click);
|
||||||
//
|
//
|
||||||
// _4ByteMenuItem
|
// _4ByteMenuItem
|
||||||
//
|
//
|
||||||
this._4ByteMenuItem.Name = "_4ByteMenuItem";
|
this._4ByteMenuItem.Name = "_4ByteMenuItem";
|
||||||
this._4ByteMenuItem.Size = new System.Drawing.Size(152, 22);
|
this._4ByteMenuItem.Size = new System.Drawing.Size(111, 22);
|
||||||
this._4ByteMenuItem.Text = "4 Bytes";
|
this._4ByteMenuItem.Text = "4 Bytes";
|
||||||
this._4ByteMenuItem.Click += new System.EventHandler(this._4ByteMenuItem_Click);
|
this._4ByteMenuItem.Click += new System.EventHandler(this._4ByteMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -419,6 +423,7 @@
|
||||||
this.panel1.AutoScroll = true;
|
this.panel1.AutoScroll = true;
|
||||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
this.panel1.Controls.Add(this.BestAttemptLogLabel);
|
this.panel1.Controls.Add(this.BestAttemptLogLabel);
|
||||||
|
this.panel1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.panel1.Location = new System.Drawing.Point(12, 112);
|
this.panel1.Location = new System.Drawing.Point(12, 112);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(227, 251);
|
this.panel1.Size = new System.Drawing.Size(227, 251);
|
||||||
|
@ -429,7 +434,7 @@
|
||||||
this.BestAttemptLogLabel.AutoSize = true;
|
this.BestAttemptLogLabel.AutoSize = true;
|
||||||
this.BestAttemptLogLabel.Location = new System.Drawing.Point(8, 8);
|
this.BestAttemptLogLabel.Location = new System.Drawing.Point(8, 8);
|
||||||
this.BestAttemptLogLabel.Name = "BestAttemptLogLabel";
|
this.BestAttemptLogLabel.Name = "BestAttemptLogLabel";
|
||||||
this.BestAttemptLogLabel.Size = new System.Drawing.Size(130, 13);
|
this.BestAttemptLogLabel.Size = new System.Drawing.Size(294, 14);
|
||||||
this.BestAttemptLogLabel.TabIndex = 0;
|
this.BestAttemptLogLabel.TabIndex = 0;
|
||||||
this.BestAttemptLogLabel.Text = " ";
|
this.BestAttemptLogLabel.Text = " ";
|
||||||
//
|
//
|
||||||
|
@ -511,7 +516,7 @@
|
||||||
this.label13.Name = "label13";
|
this.label13.Name = "label13";
|
||||||
this.label13.Size = new System.Drawing.Size(53, 13);
|
this.label13.Size = new System.Drawing.Size(53, 13);
|
||||||
this.label13.TabIndex = 0;
|
this.label13.TabIndex = 0;
|
||||||
this.label13.Text = "Maximize:";
|
this.label13.Text = "Main Value:";
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
|
@ -553,6 +558,10 @@
|
||||||
//
|
//
|
||||||
this.GoalGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.GoalGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.GoalGroupBox.Controls.Add(this.Tiebreak3Operator);
|
||||||
|
this.GoalGroupBox.Controls.Add(this.Tiebreak2Operator);
|
||||||
|
this.GoalGroupBox.Controls.Add(this.Tiebreak1Operator);
|
||||||
|
this.GoalGroupBox.Controls.Add(this.mainOperator);
|
||||||
this.GoalGroupBox.Controls.Add(this.label12);
|
this.GoalGroupBox.Controls.Add(this.label12);
|
||||||
this.GoalGroupBox.Controls.Add(this.label11);
|
this.GoalGroupBox.Controls.Add(this.label11);
|
||||||
this.GoalGroupBox.Controls.Add(this.label10);
|
this.GoalGroupBox.Controls.Add(this.label10);
|
||||||
|
@ -573,12 +582,72 @@
|
||||||
this.GoalGroupBox.Size = new System.Drawing.Size(312, 150);
|
this.GoalGroupBox.Size = new System.Drawing.Size(312, 150);
|
||||||
this.GoalGroupBox.TabIndex = 9;
|
this.GoalGroupBox.TabIndex = 9;
|
||||||
this.GoalGroupBox.TabStop = false;
|
this.GoalGroupBox.TabStop = false;
|
||||||
this.GoalGroupBox.Text = "Goal";
|
this.GoalGroupBox.Text = " ";
|
||||||
|
//
|
||||||
|
// Tiebreak3Operator
|
||||||
|
//
|
||||||
|
this.Tiebreak3Operator.FormattingEnabled = true;
|
||||||
|
this.Tiebreak3Operator.Items.AddRange(new object[] {
|
||||||
|
">",
|
||||||
|
">=",
|
||||||
|
"=",
|
||||||
|
"<=",
|
||||||
|
"<"});
|
||||||
|
this.Tiebreak3Operator.Location = new System.Drawing.Point(266, 119);
|
||||||
|
this.Tiebreak3Operator.Name = "Tiebreak3Operator";
|
||||||
|
this.Tiebreak3Operator.Size = new System.Drawing.Size(40, 21);
|
||||||
|
this.Tiebreak3Operator.TabIndex = 1009;
|
||||||
|
Tiebreak3Operator.SelectedIndex = 0;
|
||||||
|
//
|
||||||
|
// Tiebreak2Operator
|
||||||
|
//
|
||||||
|
this.Tiebreak2Operator.FormattingEnabled = true;
|
||||||
|
this.Tiebreak2Operator.Items.AddRange(new object[] {
|
||||||
|
">",
|
||||||
|
">=",
|
||||||
|
"=",
|
||||||
|
"<=",
|
||||||
|
"<"});
|
||||||
|
this.Tiebreak2Operator.Location = new System.Drawing.Point(266, 98);
|
||||||
|
this.Tiebreak2Operator.Name = "Tiebreak2Operator";
|
||||||
|
this.Tiebreak2Operator.Size = new System.Drawing.Size(40, 21);
|
||||||
|
this.Tiebreak2Operator.TabIndex = 1008;
|
||||||
|
Tiebreak2Operator.SelectedIndex = 0;
|
||||||
|
//
|
||||||
|
// Tiebreak1Operator
|
||||||
|
//
|
||||||
|
this.Tiebreak1Operator.FormattingEnabled = true;
|
||||||
|
this.Tiebreak1Operator.Items.AddRange(new object[] {
|
||||||
|
">",
|
||||||
|
">=",
|
||||||
|
"=",
|
||||||
|
"<=",
|
||||||
|
"<"});
|
||||||
|
this.Tiebreak1Operator.Location = new System.Drawing.Point(266, 76);
|
||||||
|
this.Tiebreak1Operator.Name = "Tiebreak1Operator";
|
||||||
|
this.Tiebreak1Operator.Size = new System.Drawing.Size(40, 21);
|
||||||
|
this.Tiebreak1Operator.TabIndex = 1007;
|
||||||
|
Tiebreak1Operator.SelectedIndex = 0;
|
||||||
|
//
|
||||||
|
// mainOperator
|
||||||
|
//
|
||||||
|
this.mainOperator.FormattingEnabled = true;
|
||||||
|
this.mainOperator.Items.AddRange(new object[] {
|
||||||
|
">",
|
||||||
|
">=",
|
||||||
|
"=",
|
||||||
|
"<=",
|
||||||
|
"<"});
|
||||||
|
this.mainOperator.Location = new System.Drawing.Point(266, 54);
|
||||||
|
this.mainOperator.Name = "mainOperator";
|
||||||
|
this.mainOperator.Size = new System.Drawing.Size(40, 21);
|
||||||
|
this.mainOperator.TabIndex = 1006;
|
||||||
|
mainOperator.SelectedIndex = 0;
|
||||||
//
|
//
|
||||||
// label12
|
// label12
|
||||||
//
|
//
|
||||||
this.label12.AutoSize = true;
|
this.label12.AutoSize = true;
|
||||||
this.label12.Location = new System.Drawing.Point(108, 124);
|
this.label12.Location = new System.Drawing.Point(74, 122);
|
||||||
this.label12.Name = "label12";
|
this.label12.Name = "label12";
|
||||||
this.label12.Size = new System.Drawing.Size(59, 13);
|
this.label12.Size = new System.Drawing.Size(59, 13);
|
||||||
this.label12.TabIndex = 14;
|
this.label12.TabIndex = 14;
|
||||||
|
@ -587,7 +656,7 @@
|
||||||
// label11
|
// label11
|
||||||
//
|
//
|
||||||
this.label11.AutoSize = true;
|
this.label11.AutoSize = true;
|
||||||
this.label11.Location = new System.Drawing.Point(108, 102);
|
this.label11.Location = new System.Drawing.Point(73, 101);
|
||||||
this.label11.Name = "label11";
|
this.label11.Name = "label11";
|
||||||
this.label11.Size = new System.Drawing.Size(59, 13);
|
this.label11.Size = new System.Drawing.Size(59, 13);
|
||||||
this.label11.TabIndex = 13;
|
this.label11.TabIndex = 13;
|
||||||
|
@ -596,7 +665,7 @@
|
||||||
// label10
|
// label10
|
||||||
//
|
//
|
||||||
this.label10.AutoSize = true;
|
this.label10.AutoSize = true;
|
||||||
this.label10.Location = new System.Drawing.Point(108, 79);
|
this.label10.Location = new System.Drawing.Point(73, 79);
|
||||||
this.label10.Name = "label10";
|
this.label10.Name = "label10";
|
||||||
this.label10.Size = new System.Drawing.Size(59, 13);
|
this.label10.Size = new System.Drawing.Size(59, 13);
|
||||||
this.label10.TabIndex = 12;
|
this.label10.TabIndex = 12;
|
||||||
|
@ -605,7 +674,7 @@
|
||||||
// label9
|
// label9
|
||||||
//
|
//
|
||||||
this.label9.AutoSize = true;
|
this.label9.AutoSize = true;
|
||||||
this.label9.Location = new System.Drawing.Point(108, 56);
|
this.label9.Location = new System.Drawing.Point(73, 57);
|
||||||
this.label9.Name = "label9";
|
this.label9.Name = "label9";
|
||||||
this.label9.Size = new System.Drawing.Size(59, 13);
|
this.label9.Size = new System.Drawing.Size(59, 13);
|
||||||
this.label9.TabIndex = 11;
|
this.label9.TabIndex = 11;
|
||||||
|
@ -614,7 +683,7 @@
|
||||||
// label7
|
// label7
|
||||||
//
|
//
|
||||||
this.label7.AutoSize = true;
|
this.label7.AutoSize = true;
|
||||||
this.label7.Location = new System.Drawing.Point(42, 124);
|
this.label7.Location = new System.Drawing.Point(6, 122);
|
||||||
this.label7.Name = "label7";
|
this.label7.Name = "label7";
|
||||||
this.label7.Size = new System.Drawing.Size(61, 13);
|
this.label7.Size = new System.Drawing.Size(61, 13);
|
||||||
this.label7.TabIndex = 10;
|
this.label7.TabIndex = 10;
|
||||||
|
@ -623,7 +692,7 @@
|
||||||
// label6
|
// label6
|
||||||
//
|
//
|
||||||
this.label6.AutoSize = true;
|
this.label6.AutoSize = true;
|
||||||
this.label6.Location = new System.Drawing.Point(42, 102);
|
this.label6.Location = new System.Drawing.Point(6, 101);
|
||||||
this.label6.Name = "label6";
|
this.label6.Name = "label6";
|
||||||
this.label6.Size = new System.Drawing.Size(61, 13);
|
this.label6.Size = new System.Drawing.Size(61, 13);
|
||||||
this.label6.TabIndex = 9;
|
this.label6.TabIndex = 9;
|
||||||
|
@ -634,10 +703,10 @@
|
||||||
this.TieBreaker1Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.TieBreaker1Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.TieBreaker1Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
this.TieBreaker1Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
this.TieBreaker1Box.Location = new System.Drawing.Point(167, 75);
|
this.TieBreaker1Box.Location = new System.Drawing.Point(139, 76);
|
||||||
this.TieBreaker1Box.Name = "TieBreaker1Box";
|
this.TieBreaker1Box.Name = "TieBreaker1Box";
|
||||||
this.TieBreaker1Box.Nullable = true;
|
this.TieBreaker1Box.Nullable = true;
|
||||||
this.TieBreaker1Box.Size = new System.Drawing.Size(95, 20);
|
this.TieBreaker1Box.Size = new System.Drawing.Size(121, 20);
|
||||||
this.TieBreaker1Box.TabIndex = 1002;
|
this.TieBreaker1Box.TabIndex = 1002;
|
||||||
//
|
//
|
||||||
// TieBreaker2Box
|
// TieBreaker2Box
|
||||||
|
@ -645,10 +714,10 @@
|
||||||
this.TieBreaker2Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.TieBreaker2Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.TieBreaker2Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
this.TieBreaker2Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
this.TieBreaker2Box.Location = new System.Drawing.Point(167, 98);
|
this.TieBreaker2Box.Location = new System.Drawing.Point(139, 98);
|
||||||
this.TieBreaker2Box.Name = "TieBreaker2Box";
|
this.TieBreaker2Box.Name = "TieBreaker2Box";
|
||||||
this.TieBreaker2Box.Nullable = true;
|
this.TieBreaker2Box.Nullable = true;
|
||||||
this.TieBreaker2Box.Size = new System.Drawing.Size(95, 20);
|
this.TieBreaker2Box.Size = new System.Drawing.Size(121, 20);
|
||||||
this.TieBreaker2Box.TabIndex = 1003;
|
this.TieBreaker2Box.TabIndex = 1003;
|
||||||
//
|
//
|
||||||
// TieBreaker3Box
|
// TieBreaker3Box
|
||||||
|
@ -656,16 +725,16 @@
|
||||||
this.TieBreaker3Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.TieBreaker3Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.TieBreaker3Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
this.TieBreaker3Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
this.TieBreaker3Box.Location = new System.Drawing.Point(167, 120);
|
this.TieBreaker3Box.Location = new System.Drawing.Point(139, 119);
|
||||||
this.TieBreaker3Box.Name = "TieBreaker3Box";
|
this.TieBreaker3Box.Name = "TieBreaker3Box";
|
||||||
this.TieBreaker3Box.Nullable = true;
|
this.TieBreaker3Box.Nullable = true;
|
||||||
this.TieBreaker3Box.Size = new System.Drawing.Size(95, 20);
|
this.TieBreaker3Box.Size = new System.Drawing.Size(121, 20);
|
||||||
this.TieBreaker3Box.TabIndex = 1004;
|
this.TieBreaker3Box.TabIndex = 1004;
|
||||||
//
|
//
|
||||||
// label5
|
// label5
|
||||||
//
|
//
|
||||||
this.label5.AutoSize = true;
|
this.label5.AutoSize = true;
|
||||||
this.label5.Location = new System.Drawing.Point(42, 79);
|
this.label5.Location = new System.Drawing.Point(7, 79);
|
||||||
this.label5.Name = "label5";
|
this.label5.Name = "label5";
|
||||||
this.label5.Size = new System.Drawing.Size(61, 13);
|
this.label5.Size = new System.Drawing.Size(61, 13);
|
||||||
this.label5.TabIndex = 5;
|
this.label5.TabIndex = 5;
|
||||||
|
@ -676,21 +745,21 @@
|
||||||
this.MaximizeAddressBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.MaximizeAddressBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.MaximizeAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
this.MaximizeAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
this.MaximizeAddressBox.Location = new System.Drawing.Point(167, 52);
|
this.MaximizeAddressBox.Location = new System.Drawing.Point(139, 54);
|
||||||
this.MaximizeAddressBox.Name = "MaximizeAddressBox";
|
this.MaximizeAddressBox.Name = "MaximizeAddressBox";
|
||||||
this.MaximizeAddressBox.Nullable = true;
|
this.MaximizeAddressBox.Nullable = true;
|
||||||
this.MaximizeAddressBox.Size = new System.Drawing.Size(95, 20);
|
this.MaximizeAddressBox.Size = new System.Drawing.Size(121, 20);
|
||||||
this.MaximizeAddressBox.TabIndex = 1001;
|
this.MaximizeAddressBox.TabIndex = 1001;
|
||||||
this.MaximizeAddressBox.TextChanged += new System.EventHandler(this.FrameLengthNumeric_ValueChanged);
|
this.MaximizeAddressBox.TextChanged += new System.EventHandler(this.FrameLengthNumeric_ValueChanged);
|
||||||
//
|
//
|
||||||
// maximizeLabeltext
|
// maximizeLabeltext
|
||||||
//
|
//
|
||||||
this.maximizeLabeltext.AutoSize = true;
|
this.maximizeLabeltext.AutoSize = true;
|
||||||
this.maximizeLabeltext.Location = new System.Drawing.Point(50, 56);
|
this.maximizeLabeltext.Location = new System.Drawing.Point(7, 57);
|
||||||
this.maximizeLabeltext.Name = "maximizeLabeltext";
|
this.maximizeLabeltext.Name = "maximizeLabeltext";
|
||||||
this.maximizeLabeltext.Size = new System.Drawing.Size(53, 13);
|
this.maximizeLabeltext.Size = new System.Drawing.Size(63, 13);
|
||||||
this.maximizeLabeltext.TabIndex = 3;
|
this.maximizeLabeltext.TabIndex = 3;
|
||||||
this.maximizeLabeltext.Text = "Maximize:";
|
this.maximizeLabeltext.Text = "Main Value:";
|
||||||
//
|
//
|
||||||
// label4
|
// label4
|
||||||
//
|
//
|
||||||
|
@ -920,5 +989,9 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem _1ByteMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem _1ByteMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem _2ByteMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem _2ByteMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem _4ByteMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem _4ByteMenuItem;
|
||||||
|
private System.Windows.Forms.ComboBox Tiebreak3Operator;
|
||||||
|
private System.Windows.Forms.ComboBox Tiebreak2Operator;
|
||||||
|
private System.Windows.Forms.ComboBox Tiebreak1Operator;
|
||||||
|
private System.Windows.Forms.ComboBox mainOperator;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -284,6 +284,58 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte MainComparisonType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (byte)mainOperator.SelectedIndex;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 5) mainOperator.SelectedIndex = value;
|
||||||
|
else mainOperator.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte Tie1ComparisonType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (byte)Tiebreak1Operator.SelectedIndex;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 5) Tiebreak1Operator.SelectedIndex = value;
|
||||||
|
else Tiebreak1Operator.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte Tie2ComparisonType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (byte)Tiebreak2Operator.SelectedIndex;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 5) Tiebreak2Operator.SelectedIndex = value;
|
||||||
|
else Tiebreak2Operator.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte Tie3ComparisonType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (byte)Tiebreak3Operator.SelectedIndex;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 5) Tiebreak3Operator.SelectedIndex = value;
|
||||||
|
else Tiebreak3Operator.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string FromSlot
|
public string FromSlot
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -392,6 +444,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
TieBreaker2Address = 0;
|
TieBreaker2Address = 0;
|
||||||
TieBreaker3Address = 0;
|
TieBreaker3Address = 0;
|
||||||
StartFromSlotBox.SelectedIndex = 0;
|
StartFromSlotBox.SelectedIndex = 0;
|
||||||
|
mainOperator.SelectedIndex = 0;
|
||||||
|
Tiebreak1Operator.SelectedIndex = 0;
|
||||||
|
Tiebreak2Operator.SelectedIndex = 0;
|
||||||
|
Tiebreak3Operator.SelectedIndex = 0;
|
||||||
|
|
||||||
UpdateBestAttempt();
|
UpdateBestAttempt();
|
||||||
}
|
}
|
||||||
|
@ -549,6 +605,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public int TieBreak1 { get; set; }
|
public int TieBreak1 { get; set; }
|
||||||
public int TieBreak2 { get; set; }
|
public int TieBreak2 { get; set; }
|
||||||
public int TieBreak3 { get; set; }
|
public int TieBreak3 { get; set; }
|
||||||
|
public byte ComparisonTypeMain { get; set; }
|
||||||
|
public byte ComparisonTypeTie1 { get; set; }
|
||||||
|
public byte ComparisonTypeTie2 { get; set; }
|
||||||
|
public byte ComparisonTypeTie3 { get; set; }
|
||||||
|
|
||||||
public List<string> Log { get; set; }
|
public List<string> Log { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,6 +621,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public int TieBreaker1 { get; set; }
|
public int TieBreaker1 { get; set; }
|
||||||
public int TieBreaker2 { get; set; }
|
public int TieBreaker2 { get; set; }
|
||||||
public int TieBreaker3 { get; set; }
|
public int TieBreaker3 { get; set; }
|
||||||
|
public byte ComparisonTypeMain { get; set; }
|
||||||
|
public byte ComparisonTypeTie1 { get; set; }
|
||||||
|
public byte ComparisonTypeTie2 { get; set; }
|
||||||
|
public byte ComparisonTypeTie3 { get; set; }
|
||||||
public int FrameLength { get; set; }
|
public int FrameLength { get; set; }
|
||||||
public string FromSlot { get; set; }
|
public string FromSlot { get; set; }
|
||||||
public long Attempts { get; set; }
|
public long Attempts { get; set; }
|
||||||
|
@ -611,6 +676,20 @@ namespace BizHawk.Client.EmuHawk
|
||||||
TieBreaker1Address = botData.TieBreaker1;
|
TieBreaker1Address = botData.TieBreaker1;
|
||||||
TieBreaker2Address = botData.TieBreaker2;
|
TieBreaker2Address = botData.TieBreaker2;
|
||||||
TieBreaker3Address = botData.TieBreaker3;
|
TieBreaker3Address = botData.TieBreaker3;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MainComparisonType = botData.ComparisonTypeMain;
|
||||||
|
Tie1ComparisonType = botData.ComparisonTypeTie1;
|
||||||
|
Tie2ComparisonType = botData.ComparisonTypeTie2;
|
||||||
|
Tie3ComparisonType = botData.ComparisonTypeTie3;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
MainComparisonType = 0;
|
||||||
|
Tie1ComparisonType = 0;
|
||||||
|
Tie2ComparisonType = 0;
|
||||||
|
Tie3ComparisonType = 0;
|
||||||
|
}
|
||||||
FrameLength = botData.FrameLength;
|
FrameLength = botData.FrameLength;
|
||||||
FromSlot = botData.FromSlot;
|
FromSlot = botData.FromSlot;
|
||||||
Attempts = botData.Attempts;
|
Attempts = botData.Attempts;
|
||||||
|
@ -647,6 +726,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
TieBreaker1 = TieBreaker1Address,
|
TieBreaker1 = TieBreaker1Address,
|
||||||
TieBreaker2 = TieBreaker2Address,
|
TieBreaker2 = TieBreaker2Address,
|
||||||
TieBreaker3 = TieBreaker3Address,
|
TieBreaker3 = TieBreaker3Address,
|
||||||
|
ComparisonTypeMain = MainComparisonType,
|
||||||
|
ComparisonTypeTie1 = Tie1ComparisonType,
|
||||||
|
ComparisonTypeTie2 = Tie2ComparisonType,
|
||||||
|
ComparisonTypeTie3 = Tie3ComparisonType,
|
||||||
FromSlot = FromSlot,
|
FromSlot = FromSlot,
|
||||||
FrameLength = FrameLength,
|
FrameLength = FrameLength,
|
||||||
Attempts = Attempts,
|
Attempts = Attempts,
|
||||||
|
@ -799,32 +882,50 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private bool IsBetter(BotAttempt best, BotAttempt current)
|
private bool IsBetter(BotAttempt best, BotAttempt current)
|
||||||
{
|
{
|
||||||
if (current.Maximize > best.Maximize)
|
if (!TestValue(MainComparisonType, current.Maximize, best.Maximize))
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
else if (current.Maximize == best.Maximize)
|
else if (current.Maximize == best.Maximize)
|
||||||
{
|
{
|
||||||
if (current.TieBreak1 > best.TieBreak1)
|
if (!TestValue(Tie1ComparisonType, current.TieBreak1, best.TieBreak1))
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
else if (current.TieBreak1 == best.TieBreak1)
|
else if (current.TieBreak1 == best.TieBreak1)
|
||||||
{
|
{
|
||||||
if (current.TieBreak2 > best.TieBreak2)
|
if (!TestValue(Tie2ComparisonType, current.TieBreak2, best.TieBreak2))
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
else if (current.TieBreak2 == best.TieBreak2)
|
else if (current.TieBreak2 == best.TieBreak2)
|
||||||
{
|
{
|
||||||
if (current.TieBreak3 > current.TieBreak3)
|
if (!TestValue(Tie3ComparisonType, current.TieBreak3, current.TieBreak3))
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TestValue(byte operation, int currentValue, int bestValue)
|
||||||
|
{
|
||||||
|
switch (operation)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
return currentValue > bestValue;
|
||||||
|
case 1:
|
||||||
|
return currentValue >= bestValue;
|
||||||
|
case 2:
|
||||||
|
return currentValue == bestValue;
|
||||||
|
case 3:
|
||||||
|
return currentValue <= bestValue;
|
||||||
|
case 4:
|
||||||
|
return currentValue < bestValue;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
partial class PCECDL
|
partial class CDL
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PCECDL));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CDL));
|
||||||
this.LoggingActiveCheckbox = new System.Windows.Forms.CheckBox();
|
this.LoggingActiveCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
this.menuStrip1 = new MenuStripEx();
|
this.menuStrip1 = new MenuStripEx();
|
||||||
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -52,11 +52,11 @@
|
||||||
//
|
//
|
||||||
this.LoggingActiveCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.LoggingActiveCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.LoggingActiveCheckbox.AutoSize = true;
|
this.LoggingActiveCheckbox.AutoSize = true;
|
||||||
this.LoggingActiveCheckbox.Location = new System.Drawing.Point(12, 244);
|
this.LoggingActiveCheckbox.Location = new System.Drawing.Point(12, 240);
|
||||||
this.LoggingActiveCheckbox.Name = "LoggingActiveCheckbox";
|
this.LoggingActiveCheckbox.Name = "LoggingActiveCheckbox";
|
||||||
this.LoggingActiveCheckbox.Size = new System.Drawing.Size(101, 17);
|
this.LoggingActiveCheckbox.Size = new System.Drawing.Size(107, 17);
|
||||||
this.LoggingActiveCheckbox.TabIndex = 1;
|
this.LoggingActiveCheckbox.TabIndex = 1;
|
||||||
this.LoggingActiveCheckbox.Text = "Loging is Active";
|
this.LoggingActiveCheckbox.Text = "Logging is Active";
|
||||||
this.LoggingActiveCheckbox.UseVisualStyleBackColor = true;
|
this.LoggingActiveCheckbox.UseVisualStyleBackColor = true;
|
||||||
this.LoggingActiveCheckbox.CheckedChanged += new System.EventHandler(this.LoggingActiveCheckbox_CheckedChanged);
|
this.LoggingActiveCheckbox.CheckedChanged += new System.EventHandler(this.LoggingActiveCheckbox_CheckedChanged);
|
||||||
//
|
//
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
this.FileSubMenu});
|
this.FileSubMenu});
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.menuStrip1.Name = "menuStrip1";
|
this.menuStrip1.Name = "menuStrip1";
|
||||||
this.menuStrip1.Size = new System.Drawing.Size(292, 24);
|
this.menuStrip1.Size = new System.Drawing.Size(463, 24);
|
||||||
this.menuStrip1.TabIndex = 2;
|
this.menuStrip1.TabIndex = 2;
|
||||||
this.menuStrip1.Text = "menuStrip1";
|
this.menuStrip1.Text = "menuStrip1";
|
||||||
//
|
//
|
||||||
|
@ -190,22 +190,22 @@
|
||||||
this.CdlTextbox.Multiline = true;
|
this.CdlTextbox.Multiline = true;
|
||||||
this.CdlTextbox.Name = "CdlTextbox";
|
this.CdlTextbox.Name = "CdlTextbox";
|
||||||
this.CdlTextbox.ReadOnly = true;
|
this.CdlTextbox.ReadOnly = true;
|
||||||
this.CdlTextbox.Size = new System.Drawing.Size(292, 211);
|
this.CdlTextbox.Size = new System.Drawing.Size(463, 207);
|
||||||
this.CdlTextbox.TabIndex = 3;
|
this.CdlTextbox.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// PCECDL
|
// CDL
|
||||||
//
|
//
|
||||||
this.AllowDrop = true;
|
this.AllowDrop = true;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(292, 273);
|
this.ClientSize = new System.Drawing.Size(463, 269);
|
||||||
this.Controls.Add(this.CdlTextbox);
|
this.Controls.Add(this.CdlTextbox);
|
||||||
this.Controls.Add(this.LoggingActiveCheckbox);
|
this.Controls.Add(this.LoggingActiveCheckbox);
|
||||||
this.Controls.Add(this.menuStrip1);
|
this.Controls.Add(this.menuStrip1);
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.MainMenuStrip = this.menuStrip1;
|
this.MainMenuStrip = this.menuStrip1;
|
||||||
this.MinimumSize = new System.Drawing.Size(150, 130);
|
this.MinimumSize = new System.Drawing.Size(150, 130);
|
||||||
this.Name = "PCECDL";
|
this.Name = "CDL";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "Code Data Logger";
|
this.Text = "Code Data Logger";
|
||||||
this.Load += new System.EventHandler(this.PCECDL_Load);
|
this.Load += new System.EventHandler(this.PCECDL_Load);
|
|
@ -6,21 +6,22 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||||
|
|
||||||
|
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||||
using BizHawk.Emulation.Cores.Components.H6280;
|
using BizHawk.Emulation.Cores.Components.H6280;
|
||||||
using BizHawk.Emulation.Cores.PCEngine;
|
using BizHawk.Emulation.Cores.PCEngine;
|
||||||
|
using BizHawk.Emulation.Cores.Consoles.Sega;
|
||||||
|
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
||||||
|
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
using BizHawk.Client.EmuHawk.ToolExtensions;
|
using BizHawk.Client.EmuHawk.ToolExtensions;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class PCECDL : Form, IToolFormAutoConfig
|
public partial class CDL : Form, IToolFormAutoConfig
|
||||||
{
|
{
|
||||||
[RequiredService]
|
|
||||||
private PCEngine _emu { get; set; }
|
|
||||||
private CodeDataLog _cdl;
|
|
||||||
|
|
||||||
private RecentFiles _recent_fld = new RecentFiles();
|
private RecentFiles _recent_fld = new RecentFiles();
|
||||||
|
|
||||||
[ConfigPersist]
|
[ConfigPersist]
|
||||||
private RecentFiles _recent
|
private RecentFiles _recent
|
||||||
{
|
{
|
||||||
|
@ -40,9 +41,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
[RequiredService]
|
[RequiredService]
|
||||||
private IMemoryDomains MemoryDomains { get; set; }
|
private IMemoryDomains MemoryDomains { get; set; }
|
||||||
|
|
||||||
private string _currentFileName = string.Empty;
|
[RequiredService]
|
||||||
|
private ICodeDataLogger CodeDataLogger { get; set; }
|
||||||
|
|
||||||
public PCECDL()
|
private string _currentFileName = string.Empty;
|
||||||
|
private CodeDataLog _cdl;
|
||||||
|
|
||||||
|
public CDL()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
@ -59,22 +64,24 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void Restart()
|
public void Restart()
|
||||||
{
|
{
|
||||||
LoggingActiveCheckbox.Checked = _emu.Cpu.CDLLoggingActive;
|
//don't try to recover the current CDL!
|
||||||
_cdl = _emu.Cpu.CDL;
|
//even though it seems like it might be nice, it might get mixed up between games. even if we use CheckCDL. Switching games with the same memory map will be bad.
|
||||||
_emu.InitCDLMappings();
|
_cdl = null;
|
||||||
|
_currentFileName = null;
|
||||||
|
LoggingActiveCheckbox.Checked = false;
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateDisplay()
|
private void UpdateDisplay()
|
||||||
{
|
{
|
||||||
var lines = new List<string>();
|
|
||||||
if (_cdl == null)
|
if (_cdl == null)
|
||||||
{
|
{
|
||||||
lines.Add("No CDL loaded.");
|
CdlTextbox.Text = "No CDL loaded.";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
StringWriter sw = new StringWriter();
|
||||||
lines.Add("CDL contains the following domains:");
|
sw.WriteLine("CDL contains the following domains:");
|
||||||
foreach (var kvp in _cdl)
|
foreach (var kvp in _cdl)
|
||||||
{
|
{
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
@ -94,11 +101,18 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lines.Add(string.Format("Domain {0} Size {1} Mapped {2}%", kvp.Key, kvp.Value.Length, total / (float) kvp.Value.Length * 100f));
|
sw.WriteLine("Domain {0} Size {1} Mapped {2}% ({3}/{4} bytes)", kvp.Key, kvp.Value.Length, total / (float)kvp.Value.Length * 100f, total, kvp.Value.Length);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CdlTextbox.Lines = lines.ToArray();
|
sw.WriteLine();
|
||||||
|
|
||||||
|
var bm = _cdl.GetBlockMap();
|
||||||
|
foreach (var kvp in bm)
|
||||||
|
{
|
||||||
|
sw.WriteLine("{0:X8}: {1}", kvp.Value, kvp.Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
CdlTextbox.Text = sw.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AskSaveChanges()
|
public bool AskSaveChanges()
|
||||||
|
@ -115,19 +129,29 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read))
|
using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read))
|
||||||
{
|
{
|
||||||
var newCDL = CodeDataLog.Load(fs);
|
var newCDL = new CodeDataLog();
|
||||||
if (!newCDL.CheckConsistency(_emu.Cpu.Mappings))
|
newCDL.Load(fs);
|
||||||
|
|
||||||
|
//have the core create a CodeDataLog to check mapping information against
|
||||||
|
var testCDL = new CodeDataLog();
|
||||||
|
CodeDataLogger.NewCDL(testCDL);
|
||||||
|
if (!newCDL.Check(testCDL))
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "CDL file does not match emulator's current memory map!");
|
MessageBox.Show(this, "CDL file does not match emulator's current memory map!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
//ok, it's all good:
|
||||||
_cdl = newCDL;
|
_cdl = newCDL;
|
||||||
_emu.Cpu.CDL = _cdl;
|
CodeDataLogger.SetCDL(null);
|
||||||
|
if (LoggingActiveCheckbox.Checked)
|
||||||
|
CodeDataLogger.SetCDL(_cdl);
|
||||||
|
|
||||||
|
_currentFileName = path;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Events
|
#region Events
|
||||||
|
|
||||||
|
@ -149,21 +173,34 @@ namespace BizHawk.Client.EmuHawk
|
||||||
RecentSubMenu.DropDownItems.AddRange(_recent.RecentMenu(LoadFile, true));
|
RecentSubMenu.DropDownItems.AddRange(_recent.RecentMenu(LoadFile, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NewMenuItem_Click(object sender, EventArgs e)
|
void NewFileLogic()
|
||||||
{
|
{
|
||||||
var result = MessageBox.Show(this, "OK to create new CDL?", "Query", MessageBoxButtons.YesNo);
|
_cdl = new CodeDataLog();
|
||||||
if (result == DialogResult.Yes)
|
CodeDataLogger.NewCDL(_cdl);
|
||||||
{
|
|
||||||
_cdl = CodeDataLog.Create(_emu.Cpu.Mappings);
|
if (LoggingActiveCheckbox.Checked)
|
||||||
_emu.Cpu.CDL = _cdl;
|
CodeDataLogger.SetCDL(_cdl);
|
||||||
|
else CodeDataLogger.SetCDL(null);
|
||||||
|
|
||||||
|
_currentFileName = null;
|
||||||
|
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NewMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//take care not to clobber an existing CDL
|
||||||
|
if (_cdl != null)
|
||||||
|
{
|
||||||
|
var result = MessageBox.Show(this, "OK to create new CDL?", "Query", MessageBoxButtons.YesNo);
|
||||||
|
if (result != DialogResult.Yes)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NewFileLogic();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenMenuItem_Click(object sender, EventArgs e)
|
private void OpenMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
|
||||||
var result = MessageBox.Show(this, "OK to load new CDL?", "Query", MessageBoxButtons.YesNo);
|
|
||||||
if (result == DialogResult.Yes)
|
|
||||||
{
|
{
|
||||||
var file = ToolHelpers.OpenFileDialog(
|
var file = ToolHelpers.OpenFileDialog(
|
||||||
_currentFileName,
|
_currentFileName,
|
||||||
|
@ -171,40 +208,35 @@ namespace BizHawk.Client.EmuHawk
|
||||||
"Code Data Logger Files",
|
"Code Data Logger Files",
|
||||||
"cdl");
|
"cdl");
|
||||||
|
|
||||||
if (file != null)
|
if (file == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//take care not to clobber an existing CDL
|
||||||
|
if (_cdl != null)
|
||||||
{
|
{
|
||||||
using (var fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
|
var result = MessageBox.Show(this, "OK to load new CDL?", "Query", MessageBoxButtons.YesNo);
|
||||||
{
|
if (result != DialogResult.Yes)
|
||||||
var newCDL = CodeDataLog.Load(fs);
|
return;
|
||||||
if (!newCDL.CheckConsistency(_emu.Cpu.Mappings))
|
|
||||||
{
|
|
||||||
MessageBox.Show(this, "CDL file does not match emulator's current memory map!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_cdl = newCDL;
|
|
||||||
_emu.Cpu.CDL = _cdl;
|
|
||||||
UpdateDisplay();
|
|
||||||
_recent.Add(file.FullName);
|
|
||||||
_currentFileName = file.FullName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoadFile(file.FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveMenuItem_Click(object sender, EventArgs e)
|
private void SaveMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(_currentFileName))
|
if (string.IsNullOrWhiteSpace(_currentFileName))
|
||||||
{
|
{
|
||||||
|
RunSaveAs();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
using (var fs = new FileStream(_currentFileName, FileMode.Create, FileAccess.Write))
|
using (var fs = new FileStream(_currentFileName, FileMode.Create, FileAccess.Write))
|
||||||
{
|
{
|
||||||
_cdl.Save(fs);
|
_cdl.Save(fs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveAsMenuItem_Click(object sender, EventArgs e)
|
void RunSaveAs()
|
||||||
{
|
{
|
||||||
if (_cdl == null)
|
if (_cdl == null)
|
||||||
{
|
{
|
||||||
|
@ -230,6 +262,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SaveAsMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RunSaveAs();
|
||||||
|
}
|
||||||
|
|
||||||
private void AppendMenuItem_Click(object sender, EventArgs e)
|
private void AppendMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_cdl == null)
|
if (_cdl == null)
|
||||||
|
@ -248,7 +285,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
using (var fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
|
using (var fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
|
||||||
{
|
{
|
||||||
var newCDL = CodeDataLog.Load(fs);
|
var newCDL = new CodeDataLog();
|
||||||
|
newCDL.Load(fs);
|
||||||
|
if (!_cdl.Check(newCDL))
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "CDL file does not match emulator's current memory map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
_cdl.LogicalOrFrom(newCDL);
|
_cdl.LogicalOrFrom(newCDL);
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
@ -278,17 +321,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (_cdl == null)
|
if (_cdl == null)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Cannot disassemble with no CDL loaded!", "Alert");
|
MessageBox.Show(this, "Cannot disassemble with no CDL loaded!", "Alert");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var sfd = new SaveFileDialog();
|
var sfd = new SaveFileDialog();
|
||||||
var result = sfd.ShowDialog(this);
|
var result = sfd.ShowDialog(this);
|
||||||
if (result == DialogResult.OK)
|
if (result == DialogResult.OK)
|
||||||
{
|
{
|
||||||
using (var fs = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write))
|
using (var fs = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write))
|
||||||
{
|
{
|
||||||
_cdl.Disassemble(fs, MemoryDomains);
|
CodeDataLogger.DisassembleCDL(fs, _cdl);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,6 +340,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnClosed(EventArgs e)
|
||||||
|
{
|
||||||
|
//deactivate logger
|
||||||
|
if (CodeDataLogger != null) //just in case...
|
||||||
|
CodeDataLogger.SetCDL(null);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Dialog Events
|
#region Dialog Events
|
||||||
|
@ -310,11 +359,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
if (LoggingActiveCheckbox.Checked && _cdl == null)
|
if (LoggingActiveCheckbox.Checked && _cdl == null)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Cannot log with no CDL loaded!", "Alert");
|
//implicitly create a new file
|
||||||
LoggingActiveCheckbox.Checked = false;
|
NewFileLogic();
|
||||||
}
|
}
|
||||||
|
|
||||||
_emu.Cpu.CDLLoggingActive = LoggingActiveCheckbox.Checked;
|
if (_cdl != null && LoggingActiveCheckbox.Checked)
|
||||||
|
CodeDataLogger.SetCDL(_cdl);
|
||||||
|
else
|
||||||
|
CodeDataLogger.SetCDL(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PCECDL_DragEnter(object sender, DragEventArgs e)
|
private void PCECDL_DragEnter(object sender, DragEventArgs e)
|
|
@ -63,11 +63,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
AddressBox.SetHexProperties(_cheat.Domain.Size);
|
AddressBox.SetHexProperties(_cheat.Domain.Size);
|
||||||
|
|
||||||
NameBox.Text = _cheat.Name;
|
|
||||||
AddressBox.Text = _cheat.AddressStr;
|
|
||||||
ValueBox.Text = _cheat.ValueStr;
|
|
||||||
CompareBox.Text = _cheat.Compare.HasValue ? _cheat.CompareStr : String.Empty;
|
|
||||||
|
|
||||||
ValueBox.ByteSize =
|
ValueBox.ByteSize =
|
||||||
CompareBox.ByteSize =
|
CompareBox.ByteSize =
|
||||||
_cheat.Size;
|
_cheat.Size;
|
||||||
|
@ -82,6 +77,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
BigEndianCheckBox.Checked = _cheat.BigEndian.Value;
|
BigEndianCheckBox.Checked = _cheat.BigEndian.Value;
|
||||||
|
|
||||||
|
NameBox.Text = _cheat.Name;
|
||||||
|
AddressBox.Text = _cheat.AddressStr;
|
||||||
|
ValueBox.Text = _cheat.ValueStr;
|
||||||
|
CompareBox.Text = _cheat.Compare.HasValue ? _cheat.CompareStr : String.Empty;
|
||||||
|
|
||||||
CheckFormState();
|
CheckFormState();
|
||||||
if (!_cheat.Compare.HasValue)
|
if (!_cheat.Compare.HasValue)
|
||||||
{
|
{
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
this.DisableAllContextMenuItem,
|
this.DisableAllContextMenuItem,
|
||||||
this.ViewInHexEditorContextMenuItem});
|
this.ViewInHexEditorContextMenuItem});
|
||||||
this.CheatsContextMenu.Name = "contextMenuStrip1";
|
this.CheatsContextMenu.Name = "contextMenuStrip1";
|
||||||
this.CheatsContextMenu.Size = new System.Drawing.Size(170, 92);
|
this.CheatsContextMenu.Size = new System.Drawing.Size(161, 92);
|
||||||
this.CheatsContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.CheatsContextMenu_Opening);
|
this.CheatsContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.CheatsContextMenu_Opening);
|
||||||
//
|
//
|
||||||
// ToggleContextMenuItem
|
// ToggleContextMenuItem
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
this.ToggleContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
this.ToggleContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
||||||
this.ToggleContextMenuItem.Name = "ToggleContextMenuItem";
|
this.ToggleContextMenuItem.Name = "ToggleContextMenuItem";
|
||||||
this.ToggleContextMenuItem.ShortcutKeyDisplayString = "Enter";
|
this.ToggleContextMenuItem.ShortcutKeyDisplayString = "Enter";
|
||||||
this.ToggleContextMenuItem.Size = new System.Drawing.Size(169, 22);
|
this.ToggleContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||||
this.ToggleContextMenuItem.Text = "&Toggle";
|
this.ToggleContextMenuItem.Text = "&Toggle";
|
||||||
this.ToggleContextMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click);
|
this.ToggleContextMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
this.RemoveContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
|
this.RemoveContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
|
||||||
this.RemoveContextMenuItem.Name = "RemoveContextMenuItem";
|
this.RemoveContextMenuItem.Name = "RemoveContextMenuItem";
|
||||||
this.RemoveContextMenuItem.ShortcutKeyDisplayString = "Delete";
|
this.RemoveContextMenuItem.ShortcutKeyDisplayString = "Delete";
|
||||||
this.RemoveContextMenuItem.Size = new System.Drawing.Size(169, 22);
|
this.RemoveContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||||
this.RemoveContextMenuItem.Text = "&Remove";
|
this.RemoveContextMenuItem.Text = "&Remove";
|
||||||
this.RemoveContextMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
|
this.RemoveContextMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -199,14 +199,14 @@
|
||||||
//
|
//
|
||||||
this.DisableAllContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
this.DisableAllContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
||||||
this.DisableAllContextMenuItem.Name = "DisableAllContextMenuItem";
|
this.DisableAllContextMenuItem.Name = "DisableAllContextMenuItem";
|
||||||
this.DisableAllContextMenuItem.Size = new System.Drawing.Size(169, 22);
|
this.DisableAllContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||||
this.DisableAllContextMenuItem.Text = "&Disable All";
|
this.DisableAllContextMenuItem.Text = "&Disable All";
|
||||||
this.DisableAllContextMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click);
|
this.DisableAllContextMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click);
|
||||||
//
|
//
|
||||||
// ViewInHexEditorContextMenuItem
|
// ViewInHexEditorContextMenuItem
|
||||||
//
|
//
|
||||||
this.ViewInHexEditorContextMenuItem.Name = "ViewInHexEditorContextMenuItem";
|
this.ViewInHexEditorContextMenuItem.Name = "ViewInHexEditorContextMenuItem";
|
||||||
this.ViewInHexEditorContextMenuItem.Size = new System.Drawing.Size(169, 22);
|
this.ViewInHexEditorContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||||
this.ViewInHexEditorContextMenuItem.Text = "View in Hex Editor";
|
this.ViewInHexEditorContextMenuItem.Text = "View in Hex Editor";
|
||||||
this.ViewInHexEditorContextMenuItem.Click += new System.EventHandler(this.ViewInHexEditorContextMenuItem_Click);
|
this.ViewInHexEditorContextMenuItem.Click += new System.EventHandler(this.ViewInHexEditorContextMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -235,7 +235,7 @@
|
||||||
this.toolStripSeparator1,
|
this.toolStripSeparator1,
|
||||||
this.ExitMenuItem});
|
this.ExitMenuItem});
|
||||||
this.FileSubMenu.Name = "FileSubMenu";
|
this.FileSubMenu.Name = "FileSubMenu";
|
||||||
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
|
this.FileSubMenu.Size = new System.Drawing.Size(35, 20);
|
||||||
this.FileSubMenu.Text = "&File";
|
this.FileSubMenu.Text = "&File";
|
||||||
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
|
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
this.NewMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.NewFile;
|
this.NewMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.NewFile;
|
||||||
this.NewMenuItem.Name = "NewMenuItem";
|
this.NewMenuItem.Name = "NewMenuItem";
|
||||||
this.NewMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
this.NewMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||||
this.NewMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.NewMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||||
this.NewMenuItem.Text = "&New";
|
this.NewMenuItem.Text = "&New";
|
||||||
this.NewMenuItem.Click += new System.EventHandler(this.NewMenuItem_Click);
|
this.NewMenuItem.Click += new System.EventHandler(this.NewMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
this.OpenMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile;
|
this.OpenMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile;
|
||||||
this.OpenMenuItem.Name = "OpenMenuItem";
|
this.OpenMenuItem.Name = "OpenMenuItem";
|
||||||
this.OpenMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
this.OpenMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||||
this.OpenMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.OpenMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||||
this.OpenMenuItem.Text = "&Open...";
|
this.OpenMenuItem.Text = "&Open...";
|
||||||
this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click);
|
this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -262,7 +262,7 @@
|
||||||
this.SaveMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveAs;
|
this.SaveMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveAs;
|
||||||
this.SaveMenuItem.Name = "SaveMenuItem";
|
this.SaveMenuItem.Name = "SaveMenuItem";
|
||||||
this.SaveMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
this.SaveMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||||
this.SaveMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.SaveMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||||
this.SaveMenuItem.Text = "&Save";
|
this.SaveMenuItem.Text = "&Save";
|
||||||
this.SaveMenuItem.Click += new System.EventHandler(this.SaveMenuItem_Click);
|
this.SaveMenuItem.Click += new System.EventHandler(this.SaveMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -271,14 +271,14 @@
|
||||||
this.SaveAsMenuItem.Name = "SaveAsMenuItem";
|
this.SaveAsMenuItem.Name = "SaveAsMenuItem";
|
||||||
this.SaveAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
this.SaveAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||||
| System.Windows.Forms.Keys.S)));
|
| System.Windows.Forms.Keys.S)));
|
||||||
this.SaveAsMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.SaveAsMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||||
this.SaveAsMenuItem.Text = "Save &As...";
|
this.SaveAsMenuItem.Text = "Save &As...";
|
||||||
this.SaveAsMenuItem.Click += new System.EventHandler(this.SaveAsMenuItem_Click);
|
this.SaveAsMenuItem.Click += new System.EventHandler(this.SaveAsMenuItem_Click);
|
||||||
//
|
//
|
||||||
// AppendMenuItem
|
// AppendMenuItem
|
||||||
//
|
//
|
||||||
this.AppendMenuItem.Name = "AppendMenuItem";
|
this.AppendMenuItem.Name = "AppendMenuItem";
|
||||||
this.AppendMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.AppendMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||||
this.AppendMenuItem.Text = "Append File";
|
this.AppendMenuItem.Text = "Append File";
|
||||||
//
|
//
|
||||||
// RecentSubMenu
|
// RecentSubMenu
|
||||||
|
@ -287,7 +287,7 @@
|
||||||
this.toolStripSeparator4});
|
this.toolStripSeparator4});
|
||||||
this.RecentSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent;
|
this.RecentSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent;
|
||||||
this.RecentSubMenu.Name = "RecentSubMenu";
|
this.RecentSubMenu.Name = "RecentSubMenu";
|
||||||
this.RecentSubMenu.Size = new System.Drawing.Size(195, 22);
|
this.RecentSubMenu.Size = new System.Drawing.Size(193, 22);
|
||||||
this.RecentSubMenu.Text = "Recent";
|
this.RecentSubMenu.Text = "Recent";
|
||||||
this.RecentSubMenu.DropDownOpened += new System.EventHandler(this.RecentSubMenu_DropDownOpened);
|
this.RecentSubMenu.DropDownOpened += new System.EventHandler(this.RecentSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -299,13 +299,13 @@
|
||||||
// toolStripSeparator1
|
// toolStripSeparator1
|
||||||
//
|
//
|
||||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
this.toolStripSeparator1.Size = new System.Drawing.Size(192, 6);
|
this.toolStripSeparator1.Size = new System.Drawing.Size(190, 6);
|
||||||
//
|
//
|
||||||
// ExitMenuItem
|
// ExitMenuItem
|
||||||
//
|
//
|
||||||
this.ExitMenuItem.Name = "ExitMenuItem";
|
this.ExitMenuItem.Name = "ExitMenuItem";
|
||||||
this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||||
this.ExitMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.ExitMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||||
this.ExitMenuItem.Text = "E&xit";
|
this.ExitMenuItem.Text = "E&xit";
|
||||||
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -324,7 +324,7 @@
|
||||||
this.GameGenieSeparator,
|
this.GameGenieSeparator,
|
||||||
this.OpenGameGenieEncoderDecoderMenuItem});
|
this.OpenGameGenieEncoderDecoderMenuItem});
|
||||||
this.CheatsSubMenu.Name = "CheatsSubMenu";
|
this.CheatsSubMenu.Name = "CheatsSubMenu";
|
||||||
this.CheatsSubMenu.Size = new System.Drawing.Size(55, 20);
|
this.CheatsSubMenu.Size = new System.Drawing.Size(53, 20);
|
||||||
this.CheatsSubMenu.Text = "&Cheats";
|
this.CheatsSubMenu.Text = "&Cheats";
|
||||||
this.CheatsSubMenu.DropDownOpened += new System.EventHandler(this.CheatsSubMenu_DropDownOpened);
|
this.CheatsSubMenu.DropDownOpened += new System.EventHandler(this.CheatsSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
this.RemoveCheatMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
|
this.RemoveCheatMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
|
||||||
this.RemoveCheatMenuItem.Name = "RemoveCheatMenuItem";
|
this.RemoveCheatMenuItem.Name = "RemoveCheatMenuItem";
|
||||||
this.RemoveCheatMenuItem.ShortcutKeyDisplayString = "Delete";
|
this.RemoveCheatMenuItem.ShortcutKeyDisplayString = "Delete";
|
||||||
this.RemoveCheatMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.RemoveCheatMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.RemoveCheatMenuItem.Text = "&Remove Cheat";
|
this.RemoveCheatMenuItem.Text = "&Remove Cheat";
|
||||||
this.RemoveCheatMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
|
this.RemoveCheatMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -342,21 +342,21 @@
|
||||||
this.InsertSeparatorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
|
this.InsertSeparatorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
|
||||||
this.InsertSeparatorMenuItem.Name = "InsertSeparatorMenuItem";
|
this.InsertSeparatorMenuItem.Name = "InsertSeparatorMenuItem";
|
||||||
this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||||
this.InsertSeparatorMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.InsertSeparatorMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.InsertSeparatorMenuItem.Text = "Insert Separator";
|
this.InsertSeparatorMenuItem.Text = "Insert Separator";
|
||||||
this.InsertSeparatorMenuItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
|
this.InsertSeparatorMenuItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator3
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
this.toolStripSeparator3.Size = new System.Drawing.Size(230, 6);
|
this.toolStripSeparator3.Size = new System.Drawing.Size(214, 6);
|
||||||
//
|
//
|
||||||
// MoveUpMenuItem
|
// MoveUpMenuItem
|
||||||
//
|
//
|
||||||
this.MoveUpMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp;
|
this.MoveUpMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp;
|
||||||
this.MoveUpMenuItem.Name = "MoveUpMenuItem";
|
this.MoveUpMenuItem.Name = "MoveUpMenuItem";
|
||||||
this.MoveUpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
this.MoveUpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
||||||
this.MoveUpMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.MoveUpMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.MoveUpMenuItem.Text = "Move &Up";
|
this.MoveUpMenuItem.Text = "Move &Up";
|
||||||
this.MoveUpMenuItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click);
|
this.MoveUpMenuItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -365,7 +365,7 @@
|
||||||
this.MoveDownMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown;
|
this.MoveDownMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown;
|
||||||
this.MoveDownMenuItem.Name = "MoveDownMenuItem";
|
this.MoveDownMenuItem.Name = "MoveDownMenuItem";
|
||||||
this.MoveDownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
this.MoveDownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
||||||
this.MoveDownMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.MoveDownMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.MoveDownMenuItem.Text = "Move &Down";
|
this.MoveDownMenuItem.Text = "Move &Down";
|
||||||
this.MoveDownMenuItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click);
|
this.MoveDownMenuItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -373,21 +373,21 @@
|
||||||
//
|
//
|
||||||
this.SelectAllMenuItem.Name = "SelectAllMenuItem";
|
this.SelectAllMenuItem.Name = "SelectAllMenuItem";
|
||||||
this.SelectAllMenuItem.ShortcutKeyDisplayString = "Ctrl+A";
|
this.SelectAllMenuItem.ShortcutKeyDisplayString = "Ctrl+A";
|
||||||
this.SelectAllMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.SelectAllMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.SelectAllMenuItem.Text = "Select &All";
|
this.SelectAllMenuItem.Text = "Select &All";
|
||||||
this.SelectAllMenuItem.Click += new System.EventHandler(this.SelectAllMenuItem_Click);
|
this.SelectAllMenuItem.Click += new System.EventHandler(this.SelectAllMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator6
|
// toolStripSeparator6
|
||||||
//
|
//
|
||||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||||
this.toolStripSeparator6.Size = new System.Drawing.Size(230, 6);
|
this.toolStripSeparator6.Size = new System.Drawing.Size(214, 6);
|
||||||
//
|
//
|
||||||
// ToggleMenuItem
|
// ToggleMenuItem
|
||||||
//
|
//
|
||||||
this.ToggleMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
this.ToggleMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
||||||
this.ToggleMenuItem.Name = "ToggleMenuItem";
|
this.ToggleMenuItem.Name = "ToggleMenuItem";
|
||||||
this.ToggleMenuItem.ShortcutKeyDisplayString = "Enter";
|
this.ToggleMenuItem.ShortcutKeyDisplayString = "Enter";
|
||||||
this.ToggleMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.ToggleMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.ToggleMenuItem.Text = "&Toggle";
|
this.ToggleMenuItem.Text = "&Toggle";
|
||||||
this.ToggleMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click);
|
this.ToggleMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -395,19 +395,19 @@
|
||||||
//
|
//
|
||||||
this.DisableAllCheatsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
this.DisableAllCheatsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
||||||
this.DisableAllCheatsMenuItem.Name = "DisableAllCheatsMenuItem";
|
this.DisableAllCheatsMenuItem.Name = "DisableAllCheatsMenuItem";
|
||||||
this.DisableAllCheatsMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.DisableAllCheatsMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.DisableAllCheatsMenuItem.Text = "Disable all";
|
this.DisableAllCheatsMenuItem.Text = "Disable all";
|
||||||
this.DisableAllCheatsMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click);
|
this.DisableAllCheatsMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click);
|
||||||
//
|
//
|
||||||
// GameGenieSeparator
|
// GameGenieSeparator
|
||||||
//
|
//
|
||||||
this.GameGenieSeparator.Name = "GameGenieSeparator";
|
this.GameGenieSeparator.Name = "GameGenieSeparator";
|
||||||
this.GameGenieSeparator.Size = new System.Drawing.Size(230, 6);
|
this.GameGenieSeparator.Size = new System.Drawing.Size(214, 6);
|
||||||
//
|
//
|
||||||
// OpenGameGenieEncoderDecoderMenuItem
|
// OpenGameGenieEncoderDecoderMenuItem
|
||||||
//
|
//
|
||||||
this.OpenGameGenieEncoderDecoderMenuItem.Name = "OpenGameGenieEncoderDecoderMenuItem";
|
this.OpenGameGenieEncoderDecoderMenuItem.Name = "OpenGameGenieEncoderDecoderMenuItem";
|
||||||
this.OpenGameGenieEncoderDecoderMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.OpenGameGenieEncoderDecoderMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||||
this.OpenGameGenieEncoderDecoderMenuItem.Text = "Game Genie Encoder/Decoder";
|
this.OpenGameGenieEncoderDecoderMenuItem.Text = "Game Genie Encoder/Decoder";
|
||||||
this.OpenGameGenieEncoderDecoderMenuItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
|
this.OpenGameGenieEncoderDecoderMenuItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -425,73 +425,73 @@
|
||||||
this.toolStripSeparator5,
|
this.toolStripSeparator5,
|
||||||
this.RestoreWindowSizeMenuItem});
|
this.RestoreWindowSizeMenuItem});
|
||||||
this.OptionsSubMenu.Name = "OptionsSubMenu";
|
this.OptionsSubMenu.Name = "OptionsSubMenu";
|
||||||
this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20);
|
this.OptionsSubMenu.Size = new System.Drawing.Size(56, 20);
|
||||||
this.OptionsSubMenu.Text = "&Options";
|
this.OptionsSubMenu.Text = "&Options";
|
||||||
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
|
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
// AlwaysLoadCheatsMenuItem
|
// AlwaysLoadCheatsMenuItem
|
||||||
//
|
//
|
||||||
this.AlwaysLoadCheatsMenuItem.Name = "AlwaysLoadCheatsMenuItem";
|
this.AlwaysLoadCheatsMenuItem.Name = "AlwaysLoadCheatsMenuItem";
|
||||||
this.AlwaysLoadCheatsMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.AlwaysLoadCheatsMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.AlwaysLoadCheatsMenuItem.Text = "Always load cheats";
|
this.AlwaysLoadCheatsMenuItem.Text = "Always load cheats";
|
||||||
this.AlwaysLoadCheatsMenuItem.Click += new System.EventHandler(this.AlwaysLoadCheatsMenuItem_Click);
|
this.AlwaysLoadCheatsMenuItem.Click += new System.EventHandler(this.AlwaysLoadCheatsMenuItem_Click);
|
||||||
//
|
//
|
||||||
// AutoSaveCheatsMenuItem
|
// AutoSaveCheatsMenuItem
|
||||||
//
|
//
|
||||||
this.AutoSaveCheatsMenuItem.Name = "AutoSaveCheatsMenuItem";
|
this.AutoSaveCheatsMenuItem.Name = "AutoSaveCheatsMenuItem";
|
||||||
this.AutoSaveCheatsMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.AutoSaveCheatsMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.AutoSaveCheatsMenuItem.Text = "Autosave cheats";
|
this.AutoSaveCheatsMenuItem.Text = "Autosave cheats";
|
||||||
this.AutoSaveCheatsMenuItem.Click += new System.EventHandler(this.AutoSaveCheatsMenuItem_Click);
|
this.AutoSaveCheatsMenuItem.Click += new System.EventHandler(this.AutoSaveCheatsMenuItem_Click);
|
||||||
//
|
//
|
||||||
// DisableCheatsOnLoadMenuItem
|
// DisableCheatsOnLoadMenuItem
|
||||||
//
|
//
|
||||||
this.DisableCheatsOnLoadMenuItem.Name = "DisableCheatsOnLoadMenuItem";
|
this.DisableCheatsOnLoadMenuItem.Name = "DisableCheatsOnLoadMenuItem";
|
||||||
this.DisableCheatsOnLoadMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.DisableCheatsOnLoadMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.DisableCheatsOnLoadMenuItem.Text = "Disable Cheats on Load";
|
this.DisableCheatsOnLoadMenuItem.Text = "Disable Cheats on Load";
|
||||||
this.DisableCheatsOnLoadMenuItem.Click += new System.EventHandler(this.CheatsOnOffLoadMenuItem_Click);
|
this.DisableCheatsOnLoadMenuItem.Click += new System.EventHandler(this.CheatsOnOffLoadMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator7
|
// toolStripSeparator7
|
||||||
//
|
//
|
||||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
this.toolStripSeparator7.Size = new System.Drawing.Size(196, 6);
|
this.toolStripSeparator7.Size = new System.Drawing.Size(189, 6);
|
||||||
//
|
//
|
||||||
// AutoloadMenuItem
|
// AutoloadMenuItem
|
||||||
//
|
//
|
||||||
this.AutoloadMenuItem.Name = "AutoloadMenuItem";
|
this.AutoloadMenuItem.Name = "AutoloadMenuItem";
|
||||||
this.AutoloadMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.AutoloadMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.AutoloadMenuItem.Text = "Autoload";
|
this.AutoloadMenuItem.Text = "Autoload";
|
||||||
this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click);
|
this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click);
|
||||||
//
|
//
|
||||||
// SaveWindowPositionMenuItem
|
// SaveWindowPositionMenuItem
|
||||||
//
|
//
|
||||||
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
|
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
|
||||||
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.SaveWindowPositionMenuItem.Text = "Save Window Position";
|
this.SaveWindowPositionMenuItem.Text = "Save Window Position";
|
||||||
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
|
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
|
||||||
//
|
//
|
||||||
// AlwaysOnTopMenuItem
|
// AlwaysOnTopMenuItem
|
||||||
//
|
//
|
||||||
this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem";
|
this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem";
|
||||||
this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.AlwaysOnTopMenuItem.Text = "Always on &Top";
|
this.AlwaysOnTopMenuItem.Text = "Always on &Top";
|
||||||
this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click);
|
this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click);
|
||||||
//
|
//
|
||||||
// FloatingWindowMenuItem
|
// FloatingWindowMenuItem
|
||||||
//
|
//
|
||||||
this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem";
|
this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem";
|
||||||
this.FloatingWindowMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.FloatingWindowMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.FloatingWindowMenuItem.Text = "Floating Window";
|
this.FloatingWindowMenuItem.Text = "Floating Window";
|
||||||
this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click);
|
this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator5
|
// toolStripSeparator5
|
||||||
//
|
//
|
||||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||||
this.toolStripSeparator5.Size = new System.Drawing.Size(196, 6);
|
this.toolStripSeparator5.Size = new System.Drawing.Size(189, 6);
|
||||||
//
|
//
|
||||||
// RestoreWindowSizeMenuItem
|
// RestoreWindowSizeMenuItem
|
||||||
//
|
//
|
||||||
this.RestoreWindowSizeMenuItem.Name = "RestoreWindowSizeMenuItem";
|
this.RestoreWindowSizeMenuItem.Name = "RestoreWindowSizeMenuItem";
|
||||||
this.RestoreWindowSizeMenuItem.Size = new System.Drawing.Size(199, 22);
|
this.RestoreWindowSizeMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
this.RestoreWindowSizeMenuItem.Text = "Restore Default Settings";
|
this.RestoreWindowSizeMenuItem.Text = "Restore Default Settings";
|
||||||
this.RestoreWindowSizeMenuItem.Click += new System.EventHandler(this.RestoreDefaultsMenuItem_Click);
|
this.RestoreWindowSizeMenuItem.Click += new System.EventHandler(this.RestoreDefaultsMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -607,7 +607,7 @@
|
||||||
this.LoadGameGenieToolbarItem.Image = ((System.Drawing.Image)(resources.GetObject("LoadGameGenieToolbarItem.Image")));
|
this.LoadGameGenieToolbarItem.Image = ((System.Drawing.Image)(resources.GetObject("LoadGameGenieToolbarItem.Image")));
|
||||||
this.LoadGameGenieToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.LoadGameGenieToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.LoadGameGenieToolbarItem.Name = "LoadGameGenieToolbarItem";
|
this.LoadGameGenieToolbarItem.Name = "LoadGameGenieToolbarItem";
|
||||||
this.LoadGameGenieToolbarItem.Size = new System.Drawing.Size(75, 22);
|
this.LoadGameGenieToolbarItem.Size = new System.Drawing.Size(68, 22);
|
||||||
this.LoadGameGenieToolbarItem.Text = "Game Genie";
|
this.LoadGameGenieToolbarItem.Text = "Game Genie";
|
||||||
this.LoadGameGenieToolbarItem.ToolTipText = "Open the Game Genie Encoder/Decoder";
|
this.LoadGameGenieToolbarItem.ToolTipText = "Open the Game Genie Encoder/Decoder";
|
||||||
this.LoadGameGenieToolbarItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
|
this.LoadGameGenieToolbarItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
|
||||||
|
@ -648,8 +648,8 @@
|
||||||
this.CheatEditor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.CheatEditor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.CheatEditor.MemoryDomains = null;
|
|
||||||
this.CheatEditor.Location = new System.Drawing.Point(6, 14);
|
this.CheatEditor.Location = new System.Drawing.Point(6, 14);
|
||||||
|
this.CheatEditor.MemoryDomains = null;
|
||||||
this.CheatEditor.Name = "CheatEditor";
|
this.CheatEditor.Name = "CheatEditor";
|
||||||
this.CheatEditor.Size = new System.Drawing.Size(190, 264);
|
this.CheatEditor.Size = new System.Drawing.Size(190, 264);
|
||||||
this.CheatEditor.TabIndex = 0;
|
this.CheatEditor.TabIndex = 0;
|
||||||
|
|
|
@ -629,7 +629,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void CheatListView_Click(object sender, EventArgs e)
|
private void CheatListView_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DoSelectedIndexChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheatListView_DoubleClick(object sender, EventArgs e)
|
private void CheatListView_DoubleClick(object sender, EventArgs e)
|
||||||
|
|
|
@ -233,6 +233,7 @@
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.AutoScroll = true;
|
||||||
this.ClientSize = new System.Drawing.Size(1078, 954);
|
this.ClientSize = new System.Drawing.Size(1078, 954);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Controls.Add(this.groupBox5);
|
this.Controls.Add(this.groupBox5);
|
||||||
|
|
|
@ -21,6 +21,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private LibGPGX.VDPView View = new LibGPGX.VDPView();
|
private LibGPGX.VDPView View = new LibGPGX.VDPView();
|
||||||
int palindex = 0;
|
int palindex = 0;
|
||||||
|
|
||||||
|
protected override System.Drawing.Point ScrollToControl(System.Windows.Forms.Control activeControl)
|
||||||
|
{
|
||||||
|
// Returning the current location prevents the panel from scrolling to the active control when the panel loses and regains focus
|
||||||
|
return this.DisplayRectangle.Location;
|
||||||
|
}
|
||||||
|
|
||||||
public GenVDPViewer()
|
public GenVDPViewer()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
this.CopyMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Duplicate;
|
this.CopyMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Duplicate;
|
||||||
this.CopyMenuItem.Name = "CopyMenuItem";
|
this.CopyMenuItem.Name = "CopyMenuItem";
|
||||||
this.CopyMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
this.CopyMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
||||||
this.CopyMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.CopyMenuItem.Size = new System.Drawing.Size(144, 22);
|
||||||
this.CopyMenuItem.Text = "&Copy";
|
this.CopyMenuItem.Text = "&Copy";
|
||||||
this.CopyMenuItem.Click += new System.EventHandler(this.CopyMenuItem_Click);
|
this.CopyMenuItem.Click += new System.EventHandler(this.CopyMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
//
|
//
|
||||||
this.ExportMenuItem.Name = "ExportMenuItem";
|
this.ExportMenuItem.Name = "ExportMenuItem";
|
||||||
this.ExportMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
this.ExportMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
||||||
this.ExportMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.ExportMenuItem.Size = new System.Drawing.Size(144, 22);
|
||||||
this.ExportMenuItem.Text = "&Export";
|
this.ExportMenuItem.Text = "&Export";
|
||||||
this.ExportMenuItem.Click += new System.EventHandler(this.ExportMenuItem_Click);
|
this.ExportMenuItem.Click += new System.EventHandler(this.ExportMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -237,20 +237,20 @@
|
||||||
this.PasteMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Paste;
|
this.PasteMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Paste;
|
||||||
this.PasteMenuItem.Name = "PasteMenuItem";
|
this.PasteMenuItem.Name = "PasteMenuItem";
|
||||||
this.PasteMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
this.PasteMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
||||||
this.PasteMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.PasteMenuItem.Size = new System.Drawing.Size(144, 22);
|
||||||
this.PasteMenuItem.Text = "&Paste";
|
this.PasteMenuItem.Text = "&Paste";
|
||||||
this.PasteMenuItem.Click += new System.EventHandler(this.PasteMenuItem_Click);
|
this.PasteMenuItem.Click += new System.EventHandler(this.PasteMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator6
|
// toolStripSeparator6
|
||||||
//
|
//
|
||||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||||
this.toolStripSeparator6.Size = new System.Drawing.Size(149, 6);
|
this.toolStripSeparator6.Size = new System.Drawing.Size(141, 6);
|
||||||
//
|
//
|
||||||
// FindMenuItem
|
// FindMenuItem
|
||||||
//
|
//
|
||||||
this.FindMenuItem.Name = "FindMenuItem";
|
this.FindMenuItem.Name = "FindMenuItem";
|
||||||
this.FindMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
|
this.FindMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
|
||||||
this.FindMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.FindMenuItem.Size = new System.Drawing.Size(144, 22);
|
||||||
this.FindMenuItem.Text = "&Find...";
|
this.FindMenuItem.Text = "&Find...";
|
||||||
this.FindMenuItem.Click += new System.EventHandler(this.FindMenuItem_Click);
|
this.FindMenuItem.Click += new System.EventHandler(this.FindMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
//
|
//
|
||||||
this.FindNextMenuItem.Name = "FindNextMenuItem";
|
this.FindNextMenuItem.Name = "FindNextMenuItem";
|
||||||
this.FindNextMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
|
this.FindNextMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
|
||||||
this.FindNextMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.FindNextMenuItem.Size = new System.Drawing.Size(144, 22);
|
||||||
this.FindNextMenuItem.Text = "Find Next";
|
this.FindNextMenuItem.Text = "Find Next";
|
||||||
this.FindNextMenuItem.Click += new System.EventHandler(this.FindNextMenuItem_Click);
|
this.FindNextMenuItem.Click += new System.EventHandler(this.FindNextMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
//
|
//
|
||||||
this.FindPrevMenuItem.Name = "FindPrevMenuItem";
|
this.FindPrevMenuItem.Name = "FindPrevMenuItem";
|
||||||
this.FindPrevMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
|
this.FindPrevMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
|
||||||
this.FindPrevMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.FindPrevMenuItem.Size = new System.Drawing.Size(144, 22);
|
||||||
this.FindPrevMenuItem.Text = "Find Prev";
|
this.FindPrevMenuItem.Text = "Find Prev";
|
||||||
this.FindPrevMenuItem.Click += new System.EventHandler(this.FindPrevMenuItem_Click);
|
this.FindPrevMenuItem.Click += new System.EventHandler(this.FindPrevMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
|
|
@ -1901,6 +1901,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ClearNibbles();
|
ClearNibbles();
|
||||||
SetHighlighted(_addressHighlighted + 1);
|
SetHighlighted(_addressHighlighted + 1);
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1929,6 +1930,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ClearNibbles();
|
ClearNibbles();
|
||||||
SetHighlighted(_addressHighlighted + 2);
|
SetHighlighted(_addressHighlighted + 2);
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1980,6 +1982,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ClearNibbles();
|
ClearNibbles();
|
||||||
SetHighlighted(_addressHighlighted + 4);
|
SetHighlighted(_addressHighlighted + 4);
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"borderheight",
|
"borderheight",
|
||||||
"Gets the current height in pixels of the border around the emulator's drawing area"
|
"Gets the current height in pixels of the letter/pillarbox area (top side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex."
|
||||||
)]
|
)]
|
||||||
public static int BorderHeight()
|
public static int BorderHeight()
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"borderwidth",
|
"borderwidth",
|
||||||
"Gets the current width in pixels of the border around the emulator's drawing area"
|
"Gets the current width in pixels of the letter/pillarbox area (left side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex."
|
||||||
)]
|
)]
|
||||||
public static int BorderWidth()
|
public static int BorderWidth()
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"bufferheight",
|
"bufferheight",
|
||||||
"Gets the current height in pixels of the emulator's drawing area"
|
"Gets the visible height of the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex."
|
||||||
)]
|
)]
|
||||||
public int BufferHeight()
|
public int BufferHeight()
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"bufferwidth",
|
"bufferwidth",
|
||||||
"Gets the current width in pixels of the emulator's drawing area"
|
"Gets the visible width of the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex."
|
||||||
)]
|
)]
|
||||||
public int BufferWidth()
|
public int BufferWidth()
|
||||||
{
|
{
|
||||||
|
@ -161,6 +161,34 @@ namespace BizHawk.Client.EmuHawk
|
||||||
GlobalWin.MainForm.FrameBufferResized();
|
GlobalWin.MainForm.FrameBufferResized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[LuaMethodAttributes(
|
||||||
|
"SetSoundOn",
|
||||||
|
"Sets the state of the Sound On toggle"
|
||||||
|
)]
|
||||||
|
public static void SetSoundOn(bool enable)
|
||||||
|
{
|
||||||
|
Global.Config.SoundEnabled = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
[LuaMethodAttributes(
|
||||||
|
"GetSoundOn",
|
||||||
|
"Gets the state of the Sound On toggle"
|
||||||
|
)]
|
||||||
|
public static bool GetSoundOn()
|
||||||
|
{
|
||||||
|
return Global.Config.SoundEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
[LuaMethodAttributes(
|
||||||
|
"SetClientExtraPadding",
|
||||||
|
"Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements"
|
||||||
|
)]
|
||||||
|
public static void SetClientExtraPadding(int left, int top, int right, int bottom)
|
||||||
|
{
|
||||||
|
GlobalWin.DisplayManager.ClientExtraPadding = new System.Windows.Forms.Padding(left, top, right, bottom);
|
||||||
|
GlobalWin.MainForm.FrameBufferResized();
|
||||||
|
}
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"ispaused",
|
"ispaused",
|
||||||
"Returns true if emulator is paused, otherwise, false"
|
"Returns true if emulator is paused, otherwise, false"
|
||||||
|
@ -280,7 +308,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"screenheight",
|
"screenheight",
|
||||||
"Gets the current width in pixels of the emulator's drawing area"
|
"Gets the current height in pixels of the emulator's drawing area"
|
||||||
)]
|
)]
|
||||||
public static int ScreenHeight()
|
public static int ScreenHeight()
|
||||||
{
|
{
|
||||||
|
@ -332,7 +360,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"screenwidth",
|
"screenwidth",
|
||||||
"Gets the current height in pixels of the emulator's drawing area"
|
"Gets the current width in pixels of the emulator's drawing area"
|
||||||
)]
|
)]
|
||||||
public static int ScreenWidth()
|
public static int ScreenWidth()
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,9 +78,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable
|
// Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable
|
||||||
private static void LogWithSeparator(string separator, string terminator, params object[] outputs)
|
private static void LogWithSeparator(string separator, string terminator, params object[] outputs)
|
||||||
{
|
{
|
||||||
if(outputs == null)
|
if (outputs == null)
|
||||||
{
|
{
|
||||||
GlobalWin.Tools.LuaConsole.WriteToOutputWindow("NULL");
|
GlobalWin.Tools.LuaConsole.WriteToOutputWindow("(no return)" + terminator);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (var outIndex = 0; outIndex < outputs.Length; outIndex++)
|
for (var outIndex = 0; outIndex < outputs.Length; outIndex++)
|
||||||
|
@ -94,7 +94,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (output == null)
|
if (output == null)
|
||||||
{
|
{
|
||||||
GlobalWin.Tools.LuaConsole.WriteToOutputWindow("NULL");
|
GlobalWin.Tools.LuaConsole.WriteToOutputWindow("nil");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -442,7 +442,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
"drawPolygon",
|
"drawPolygon",
|
||||||
"Draws a polygon using the table of coordinates specified in points. Line is the color of the polygon. Background is the optional fill color"
|
"Draws a polygon using the table of coordinates specified in points. This should be a table of tables(each of size 2). Line is the color of the polygon. Background is the optional fill color"
|
||||||
)]
|
)]
|
||||||
public void DrawPolygon(LuaTable points, Color? line = null, Color? background = null)
|
public void DrawPolygon(LuaTable points, Color? line = null, Color? background = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
this.LuaListView = new BizHawk.Client.EmuHawk.VirtualListView();
|
this.LuaListView = new BizHawk.Client.EmuHawk.VirtualListView();
|
||||||
this.Script = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.Script = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.PathName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.PathName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
this.ScriptListContextMenu.SuspendLayout();
|
this.ScriptListContextMenu.SuspendLayout();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
|
@ -122,14 +123,14 @@
|
||||||
this.ScriptContextSeparator,
|
this.ScriptContextSeparator,
|
||||||
this.StopAllScriptsContextItem});
|
this.StopAllScriptsContextItem});
|
||||||
this.ScriptListContextMenu.Name = "contextMenuStrip1";
|
this.ScriptListContextMenu.Name = "contextMenuStrip1";
|
||||||
this.ScriptListContextMenu.Size = new System.Drawing.Size(165, 142);
|
this.ScriptListContextMenu.Size = new System.Drawing.Size(158, 142);
|
||||||
this.ScriptListContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ScriptListContextMenu_Opening);
|
this.ScriptListContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ScriptListContextMenu_Opening);
|
||||||
//
|
//
|
||||||
// ToggleScriptContextItem
|
// ToggleScriptContextItem
|
||||||
//
|
//
|
||||||
this.ToggleScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
this.ToggleScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
||||||
this.ToggleScriptContextItem.Name = "ToggleScriptContextItem";
|
this.ToggleScriptContextItem.Name = "ToggleScriptContextItem";
|
||||||
this.ToggleScriptContextItem.Size = new System.Drawing.Size(164, 22);
|
this.ToggleScriptContextItem.Size = new System.Drawing.Size(157, 22);
|
||||||
this.ToggleScriptContextItem.Text = "&Toggle";
|
this.ToggleScriptContextItem.Text = "&Toggle";
|
||||||
this.ToggleScriptContextItem.Click += new System.EventHandler(this.ToggleScriptMenuItem_Click);
|
this.ToggleScriptContextItem.Click += new System.EventHandler(this.ToggleScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -137,7 +138,7 @@
|
||||||
//
|
//
|
||||||
this.PauseScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Pause;
|
this.PauseScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Pause;
|
||||||
this.PauseScriptContextItem.Name = "PauseScriptContextItem";
|
this.PauseScriptContextItem.Name = "PauseScriptContextItem";
|
||||||
this.PauseScriptContextItem.Size = new System.Drawing.Size(164, 22);
|
this.PauseScriptContextItem.Size = new System.Drawing.Size(157, 22);
|
||||||
this.PauseScriptContextItem.Text = "Pause or Resume";
|
this.PauseScriptContextItem.Text = "Pause or Resume";
|
||||||
this.PauseScriptContextItem.Click += new System.EventHandler(this.PauseScriptMenuItem_Click);
|
this.PauseScriptContextItem.Click += new System.EventHandler(this.PauseScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -145,7 +146,7 @@
|
||||||
//
|
//
|
||||||
this.EditScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
|
this.EditScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
|
||||||
this.EditScriptContextItem.Name = "EditScriptContextItem";
|
this.EditScriptContextItem.Name = "EditScriptContextItem";
|
||||||
this.EditScriptContextItem.Size = new System.Drawing.Size(164, 22);
|
this.EditScriptContextItem.Size = new System.Drawing.Size(157, 22);
|
||||||
this.EditScriptContextItem.Text = "&Edit";
|
this.EditScriptContextItem.Text = "&Edit";
|
||||||
this.EditScriptContextItem.Click += new System.EventHandler(this.EditScriptMenuItem_Click);
|
this.EditScriptContextItem.Click += new System.EventHandler(this.EditScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -153,7 +154,7 @@
|
||||||
//
|
//
|
||||||
this.RemoveScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Close;
|
this.RemoveScriptContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Close;
|
||||||
this.RemoveScriptContextItem.Name = "RemoveScriptContextItem";
|
this.RemoveScriptContextItem.Name = "RemoveScriptContextItem";
|
||||||
this.RemoveScriptContextItem.Size = new System.Drawing.Size(164, 22);
|
this.RemoveScriptContextItem.Size = new System.Drawing.Size(157, 22);
|
||||||
this.RemoveScriptContextItem.Text = "&Remove";
|
this.RemoveScriptContextItem.Text = "&Remove";
|
||||||
this.RemoveScriptContextItem.Click += new System.EventHandler(this.RemoveScriptMenuItem_Click);
|
this.RemoveScriptContextItem.Click += new System.EventHandler(this.RemoveScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -161,20 +162,20 @@
|
||||||
//
|
//
|
||||||
this.InsertSeperatorContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
|
this.InsertSeperatorContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
|
||||||
this.InsertSeperatorContextItem.Name = "InsertSeperatorContextItem";
|
this.InsertSeperatorContextItem.Name = "InsertSeperatorContextItem";
|
||||||
this.InsertSeperatorContextItem.Size = new System.Drawing.Size(164, 22);
|
this.InsertSeperatorContextItem.Size = new System.Drawing.Size(157, 22);
|
||||||
this.InsertSeperatorContextItem.Text = "Insert Seperator";
|
this.InsertSeperatorContextItem.Text = "Insert Seperator";
|
||||||
this.InsertSeperatorContextItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
|
this.InsertSeperatorContextItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
|
||||||
//
|
//
|
||||||
// ScriptContextSeparator
|
// ScriptContextSeparator
|
||||||
//
|
//
|
||||||
this.ScriptContextSeparator.Name = "ScriptContextSeparator";
|
this.ScriptContextSeparator.Name = "ScriptContextSeparator";
|
||||||
this.ScriptContextSeparator.Size = new System.Drawing.Size(161, 6);
|
this.ScriptContextSeparator.Size = new System.Drawing.Size(154, 6);
|
||||||
//
|
//
|
||||||
// StopAllScriptsContextItem
|
// StopAllScriptsContextItem
|
||||||
//
|
//
|
||||||
this.StopAllScriptsContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
this.StopAllScriptsContextItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
||||||
this.StopAllScriptsContextItem.Name = "StopAllScriptsContextItem";
|
this.StopAllScriptsContextItem.Name = "StopAllScriptsContextItem";
|
||||||
this.StopAllScriptsContextItem.Size = new System.Drawing.Size(164, 22);
|
this.StopAllScriptsContextItem.Size = new System.Drawing.Size(157, 22);
|
||||||
this.StopAllScriptsContextItem.Text = "Stop All Scripts";
|
this.StopAllScriptsContextItem.Text = "Stop All Scripts";
|
||||||
this.StopAllScriptsContextItem.Click += new System.EventHandler(this.StopAllScriptsMenuItem_Click);
|
this.StopAllScriptsContextItem.Click += new System.EventHandler(this.StopAllScriptsMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -205,7 +206,7 @@
|
||||||
this.toolStripSeparator1,
|
this.toolStripSeparator1,
|
||||||
this.ExitMenuItem});
|
this.ExitMenuItem});
|
||||||
this.FileSubMenu.Name = "FileSubMenu";
|
this.FileSubMenu.Name = "FileSubMenu";
|
||||||
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
|
this.FileSubMenu.Size = new System.Drawing.Size(35, 20);
|
||||||
this.FileSubMenu.Text = "&File";
|
this.FileSubMenu.Text = "&File";
|
||||||
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
|
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -215,7 +216,7 @@
|
||||||
this.NewSessionMenuItem.Name = "NewSessionMenuItem";
|
this.NewSessionMenuItem.Name = "NewSessionMenuItem";
|
||||||
this.NewSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
this.NewSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||||
| System.Windows.Forms.Keys.N)));
|
| System.Windows.Forms.Keys.N)));
|
||||||
this.NewSessionMenuItem.Size = new System.Drawing.Size(237, 22);
|
this.NewSessionMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||||
this.NewSessionMenuItem.Text = "&New Session";
|
this.NewSessionMenuItem.Text = "&New Session";
|
||||||
this.NewSessionMenuItem.Click += new System.EventHandler(this.NewSessionMenuItem_Click);
|
this.NewSessionMenuItem.Click += new System.EventHandler(this.NewSessionMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -225,7 +226,7 @@
|
||||||
this.OpenSessionMenuItem.Name = "OpenSessionMenuItem";
|
this.OpenSessionMenuItem.Name = "OpenSessionMenuItem";
|
||||||
this.OpenSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
this.OpenSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||||
| System.Windows.Forms.Keys.O)));
|
| System.Windows.Forms.Keys.O)));
|
||||||
this.OpenSessionMenuItem.Size = new System.Drawing.Size(237, 22);
|
this.OpenSessionMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||||
this.OpenSessionMenuItem.Text = "&Open Session...";
|
this.OpenSessionMenuItem.Text = "&Open Session...";
|
||||||
this.OpenSessionMenuItem.Click += new System.EventHandler(this.OpenSessionMenuItem_Click);
|
this.OpenSessionMenuItem.Click += new System.EventHandler(this.OpenSessionMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -234,7 +235,7 @@
|
||||||
this.SaveSessionMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveAs;
|
this.SaveSessionMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveAs;
|
||||||
this.SaveSessionMenuItem.Name = "SaveSessionMenuItem";
|
this.SaveSessionMenuItem.Name = "SaveSessionMenuItem";
|
||||||
this.SaveSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
this.SaveSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||||
this.SaveSessionMenuItem.Size = new System.Drawing.Size(237, 22);
|
this.SaveSessionMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||||
this.SaveSessionMenuItem.Text = "&Save Session";
|
this.SaveSessionMenuItem.Text = "&Save Session";
|
||||||
this.SaveSessionMenuItem.Click += new System.EventHandler(this.SaveSessionMenuItem_Click);
|
this.SaveSessionMenuItem.Click += new System.EventHandler(this.SaveSessionMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -243,21 +244,21 @@
|
||||||
this.SaveSessionAsMenuItem.Name = "SaveSessionAsMenuItem";
|
this.SaveSessionAsMenuItem.Name = "SaveSessionAsMenuItem";
|
||||||
this.SaveSessionAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
this.SaveSessionAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||||
| System.Windows.Forms.Keys.S)));
|
| System.Windows.Forms.Keys.S)));
|
||||||
this.SaveSessionAsMenuItem.Size = new System.Drawing.Size(237, 22);
|
this.SaveSessionAsMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||||
this.SaveSessionAsMenuItem.Text = "Save Session &As...";
|
this.SaveSessionAsMenuItem.Text = "Save Session &As...";
|
||||||
this.SaveSessionAsMenuItem.Click += new System.EventHandler(this.SaveSessionAsMenuItem_Click);
|
this.SaveSessionAsMenuItem.Click += new System.EventHandler(this.SaveSessionAsMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator9
|
// toolStripSeparator9
|
||||||
//
|
//
|
||||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||||
this.toolStripSeparator9.Size = new System.Drawing.Size(234, 6);
|
this.toolStripSeparator9.Size = new System.Drawing.Size(229, 6);
|
||||||
//
|
//
|
||||||
// RecentSessionsSubMenu
|
// RecentSessionsSubMenu
|
||||||
//
|
//
|
||||||
this.RecentSessionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.RecentSessionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.toolStripSeparator8});
|
this.toolStripSeparator8});
|
||||||
this.RecentSessionsSubMenu.Name = "RecentSessionsSubMenu";
|
this.RecentSessionsSubMenu.Name = "RecentSessionsSubMenu";
|
||||||
this.RecentSessionsSubMenu.Size = new System.Drawing.Size(237, 22);
|
this.RecentSessionsSubMenu.Size = new System.Drawing.Size(232, 22);
|
||||||
this.RecentSessionsSubMenu.Text = "Recent Sessions";
|
this.RecentSessionsSubMenu.Text = "Recent Sessions";
|
||||||
this.RecentSessionsSubMenu.DropDownOpened += new System.EventHandler(this.RecentSessionsSubMenu_DropDownOpened);
|
this.RecentSessionsSubMenu.DropDownOpened += new System.EventHandler(this.RecentSessionsSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -272,7 +273,7 @@
|
||||||
this.toolStripSeparator3});
|
this.toolStripSeparator3});
|
||||||
this.RecentScriptsSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent;
|
this.RecentScriptsSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent;
|
||||||
this.RecentScriptsSubMenu.Name = "RecentScriptsSubMenu";
|
this.RecentScriptsSubMenu.Name = "RecentScriptsSubMenu";
|
||||||
this.RecentScriptsSubMenu.Size = new System.Drawing.Size(237, 22);
|
this.RecentScriptsSubMenu.Size = new System.Drawing.Size(232, 22);
|
||||||
this.RecentScriptsSubMenu.Text = "Recent Scripts";
|
this.RecentScriptsSubMenu.Text = "Recent Scripts";
|
||||||
this.RecentScriptsSubMenu.DropDownOpened += new System.EventHandler(this.RecentScriptsSubMenu_DropDownOpened);
|
this.RecentScriptsSubMenu.DropDownOpened += new System.EventHandler(this.RecentScriptsSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -284,13 +285,13 @@
|
||||||
// toolStripSeparator1
|
// toolStripSeparator1
|
||||||
//
|
//
|
||||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
this.toolStripSeparator1.Size = new System.Drawing.Size(234, 6);
|
this.toolStripSeparator1.Size = new System.Drawing.Size(229, 6);
|
||||||
//
|
//
|
||||||
// ExitMenuItem
|
// ExitMenuItem
|
||||||
//
|
//
|
||||||
this.ExitMenuItem.Name = "ExitMenuItem";
|
this.ExitMenuItem.Name = "ExitMenuItem";
|
||||||
this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||||
this.ExitMenuItem.Size = new System.Drawing.Size(237, 22);
|
this.ExitMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||||
this.ExitMenuItem.Text = "E&xit";
|
this.ExitMenuItem.Text = "E&xit";
|
||||||
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -314,7 +315,7 @@
|
||||||
this.StopAllScriptsMenuItem,
|
this.StopAllScriptsMenuItem,
|
||||||
this.RegisteredFunctionsMenuItem});
|
this.RegisteredFunctionsMenuItem});
|
||||||
this.ScriptSubMenu.Name = "ScriptSubMenu";
|
this.ScriptSubMenu.Name = "ScriptSubMenu";
|
||||||
this.ScriptSubMenu.Size = new System.Drawing.Size(49, 20);
|
this.ScriptSubMenu.Size = new System.Drawing.Size(46, 20);
|
||||||
this.ScriptSubMenu.Text = "&Script";
|
this.ScriptSubMenu.Text = "&Script";
|
||||||
this.ScriptSubMenu.DropDownOpened += new System.EventHandler(this.ScriptSubMenu_DropDownOpened);
|
this.ScriptSubMenu.DropDownOpened += new System.EventHandler(this.ScriptSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -323,7 +324,7 @@
|
||||||
this.NewScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.NewFile;
|
this.NewScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.NewFile;
|
||||||
this.NewScriptMenuItem.Name = "NewScriptMenuItem";
|
this.NewScriptMenuItem.Name = "NewScriptMenuItem";
|
||||||
this.NewScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
this.NewScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||||
this.NewScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.NewScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.NewScriptMenuItem.Text = "New Script";
|
this.NewScriptMenuItem.Text = "New Script";
|
||||||
this.NewScriptMenuItem.Click += new System.EventHandler(this.NewScriptMenuItem_Click);
|
this.NewScriptMenuItem.Click += new System.EventHandler(this.NewScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -332,7 +333,7 @@
|
||||||
this.OpenScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile;
|
this.OpenScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile;
|
||||||
this.OpenScriptMenuItem.Name = "OpenScriptMenuItem";
|
this.OpenScriptMenuItem.Name = "OpenScriptMenuItem";
|
||||||
this.OpenScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
this.OpenScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||||
this.OpenScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.OpenScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.OpenScriptMenuItem.Text = "&Open Script...";
|
this.OpenScriptMenuItem.Text = "&Open Script...";
|
||||||
this.OpenScriptMenuItem.Click += new System.EventHandler(this.OpenScriptMenuItem_Click);
|
this.OpenScriptMenuItem.Click += new System.EventHandler(this.OpenScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -341,7 +342,7 @@
|
||||||
this.RefreshScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
this.RefreshScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
|
||||||
this.RefreshScriptMenuItem.Name = "RefreshScriptMenuItem";
|
this.RefreshScriptMenuItem.Name = "RefreshScriptMenuItem";
|
||||||
this.RefreshScriptMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
|
this.RefreshScriptMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
|
||||||
this.RefreshScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.RefreshScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.RefreshScriptMenuItem.Text = "&Re&fresh";
|
this.RefreshScriptMenuItem.Text = "&Re&fresh";
|
||||||
this.RefreshScriptMenuItem.Click += new System.EventHandler(this.RefreshScriptMenuItem_Click);
|
this.RefreshScriptMenuItem.Click += new System.EventHandler(this.RefreshScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -350,7 +351,7 @@
|
||||||
this.ToggleScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.checkbox;
|
this.ToggleScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.checkbox;
|
||||||
this.ToggleScriptMenuItem.Name = "ToggleScriptMenuItem";
|
this.ToggleScriptMenuItem.Name = "ToggleScriptMenuItem";
|
||||||
this.ToggleScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T)));
|
this.ToggleScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T)));
|
||||||
this.ToggleScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.ToggleScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.ToggleScriptMenuItem.Text = "&Toggle";
|
this.ToggleScriptMenuItem.Text = "&Toggle";
|
||||||
this.ToggleScriptMenuItem.Click += new System.EventHandler(this.ToggleScriptMenuItem_Click);
|
this.ToggleScriptMenuItem.Click += new System.EventHandler(this.ToggleScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -358,7 +359,7 @@
|
||||||
//
|
//
|
||||||
this.PauseScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Pause;
|
this.PauseScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Pause;
|
||||||
this.PauseScriptMenuItem.Name = "PauseScriptMenuItem";
|
this.PauseScriptMenuItem.Name = "PauseScriptMenuItem";
|
||||||
this.PauseScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.PauseScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.PauseScriptMenuItem.Text = "Pause or Resume";
|
this.PauseScriptMenuItem.Text = "Pause or Resume";
|
||||||
this.PauseScriptMenuItem.Click += new System.EventHandler(this.PauseScriptMenuItem_Click);
|
this.PauseScriptMenuItem.Click += new System.EventHandler(this.PauseScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -367,7 +368,7 @@
|
||||||
this.EditScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
|
this.EditScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
|
||||||
this.EditScriptMenuItem.Name = "EditScriptMenuItem";
|
this.EditScriptMenuItem.Name = "EditScriptMenuItem";
|
||||||
this.EditScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
this.EditScriptMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
||||||
this.EditScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.EditScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.EditScriptMenuItem.Text = "&Edit Script";
|
this.EditScriptMenuItem.Text = "&Edit Script";
|
||||||
this.EditScriptMenuItem.Click += new System.EventHandler(this.EditScriptMenuItem_Click);
|
this.EditScriptMenuItem.Click += new System.EventHandler(this.EditScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -376,28 +377,28 @@
|
||||||
this.RemoveScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
|
this.RemoveScriptMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
|
||||||
this.RemoveScriptMenuItem.Name = "RemoveScriptMenuItem";
|
this.RemoveScriptMenuItem.Name = "RemoveScriptMenuItem";
|
||||||
this.RemoveScriptMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete;
|
this.RemoveScriptMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete;
|
||||||
this.RemoveScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.RemoveScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.RemoveScriptMenuItem.Text = "&Remove Script";
|
this.RemoveScriptMenuItem.Text = "&Remove Script";
|
||||||
this.RemoveScriptMenuItem.Click += new System.EventHandler(this.RemoveScriptMenuItem_Click);
|
this.RemoveScriptMenuItem.Click += new System.EventHandler(this.RemoveScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
// DuplicateScriptMenuItem
|
// DuplicateScriptMenuItem
|
||||||
//
|
//
|
||||||
this.DuplicateScriptMenuItem.Name = "DuplicateScriptMenuItem";
|
this.DuplicateScriptMenuItem.Name = "DuplicateScriptMenuItem";
|
||||||
this.DuplicateScriptMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.DuplicateScriptMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.DuplicateScriptMenuItem.Text = "&Duplicate Script";
|
this.DuplicateScriptMenuItem.Text = "&Duplicate Script";
|
||||||
this.DuplicateScriptMenuItem.Click += new System.EventHandler(this.DuplicateScriptMenuItem_Click);
|
this.DuplicateScriptMenuItem.Click += new System.EventHandler(this.DuplicateScriptMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator7
|
// toolStripSeparator7
|
||||||
//
|
//
|
||||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
this.toolStripSeparator7.Size = new System.Drawing.Size(215, 6);
|
this.toolStripSeparator7.Size = new System.Drawing.Size(209, 6);
|
||||||
//
|
//
|
||||||
// InsertSeparatorMenuItem
|
// InsertSeparatorMenuItem
|
||||||
//
|
//
|
||||||
this.InsertSeparatorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
|
this.InsertSeparatorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
|
||||||
this.InsertSeparatorMenuItem.Name = "InsertSeparatorMenuItem";
|
this.InsertSeparatorMenuItem.Name = "InsertSeparatorMenuItem";
|
||||||
this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||||
this.InsertSeparatorMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.InsertSeparatorMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.InsertSeparatorMenuItem.Text = "Insert Separator";
|
this.InsertSeparatorMenuItem.Text = "Insert Separator";
|
||||||
this.InsertSeparatorMenuItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
|
this.InsertSeparatorMenuItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -406,7 +407,7 @@
|
||||||
this.MoveUpMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp;
|
this.MoveUpMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp;
|
||||||
this.MoveUpMenuItem.Name = "MoveUpMenuItem";
|
this.MoveUpMenuItem.Name = "MoveUpMenuItem";
|
||||||
this.MoveUpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
this.MoveUpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
||||||
this.MoveUpMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.MoveUpMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.MoveUpMenuItem.Text = "Move &Up";
|
this.MoveUpMenuItem.Text = "Move &Up";
|
||||||
this.MoveUpMenuItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click);
|
this.MoveUpMenuItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -415,7 +416,7 @@
|
||||||
this.MoveDownMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown;
|
this.MoveDownMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown;
|
||||||
this.MoveDownMenuItem.Name = "MoveDownMenuItem";
|
this.MoveDownMenuItem.Name = "MoveDownMenuItem";
|
||||||
this.MoveDownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
this.MoveDownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
||||||
this.MoveDownMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.MoveDownMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.MoveDownMenuItem.Text = "Move &Down";
|
this.MoveDownMenuItem.Text = "Move &Down";
|
||||||
this.MoveDownMenuItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click);
|
this.MoveDownMenuItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -423,20 +424,20 @@
|
||||||
//
|
//
|
||||||
this.SelectAllMenuItem.Name = "SelectAllMenuItem";
|
this.SelectAllMenuItem.Name = "SelectAllMenuItem";
|
||||||
this.SelectAllMenuItem.ShortcutKeyDisplayString = "Ctrl+A";
|
this.SelectAllMenuItem.ShortcutKeyDisplayString = "Ctrl+A";
|
||||||
this.SelectAllMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.SelectAllMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.SelectAllMenuItem.Text = "Select &All";
|
this.SelectAllMenuItem.Text = "Select &All";
|
||||||
this.SelectAllMenuItem.Click += new System.EventHandler(this.SelectAllMenuItem_Click);
|
this.SelectAllMenuItem.Click += new System.EventHandler(this.SelectAllMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator6
|
// toolStripSeparator6
|
||||||
//
|
//
|
||||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||||
this.toolStripSeparator6.Size = new System.Drawing.Size(215, 6);
|
this.toolStripSeparator6.Size = new System.Drawing.Size(209, 6);
|
||||||
//
|
//
|
||||||
// StopAllScriptsMenuItem
|
// StopAllScriptsMenuItem
|
||||||
//
|
//
|
||||||
this.StopAllScriptsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
this.StopAllScriptsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
|
||||||
this.StopAllScriptsMenuItem.Name = "StopAllScriptsMenuItem";
|
this.StopAllScriptsMenuItem.Name = "StopAllScriptsMenuItem";
|
||||||
this.StopAllScriptsMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.StopAllScriptsMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.StopAllScriptsMenuItem.Text = "Stop All Scripts";
|
this.StopAllScriptsMenuItem.Text = "Stop All Scripts";
|
||||||
this.StopAllScriptsMenuItem.Click += new System.EventHandler(this.StopAllScriptsMenuItem_Click);
|
this.StopAllScriptsMenuItem.Click += new System.EventHandler(this.StopAllScriptsMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -444,7 +445,7 @@
|
||||||
//
|
//
|
||||||
this.RegisteredFunctionsMenuItem.Name = "RegisteredFunctionsMenuItem";
|
this.RegisteredFunctionsMenuItem.Name = "RegisteredFunctionsMenuItem";
|
||||||
this.RegisteredFunctionsMenuItem.ShortcutKeyDisplayString = "F12";
|
this.RegisteredFunctionsMenuItem.ShortcutKeyDisplayString = "F12";
|
||||||
this.RegisteredFunctionsMenuItem.Size = new System.Drawing.Size(218, 22);
|
this.RegisteredFunctionsMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||||
this.RegisteredFunctionsMenuItem.Text = "&Registered Functions...";
|
this.RegisteredFunctionsMenuItem.Text = "&Registered Functions...";
|
||||||
this.RegisteredFunctionsMenuItem.Click += new System.EventHandler(this.RegisteredFunctionsMenuItem_Click);
|
this.RegisteredFunctionsMenuItem.Click += new System.EventHandler(this.RegisteredFunctionsMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -453,14 +454,14 @@
|
||||||
this.SettingsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.SettingsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.DisableScriptsOnLoadMenuItem});
|
this.DisableScriptsOnLoadMenuItem});
|
||||||
this.SettingsSubMenu.Name = "SettingsSubMenu";
|
this.SettingsSubMenu.Name = "SettingsSubMenu";
|
||||||
this.SettingsSubMenu.Size = new System.Drawing.Size(61, 20);
|
this.SettingsSubMenu.Size = new System.Drawing.Size(58, 20);
|
||||||
this.SettingsSubMenu.Text = "&Settings";
|
this.SettingsSubMenu.Text = "&Settings";
|
||||||
this.SettingsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
|
this.SettingsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
|
||||||
//
|
//
|
||||||
// DisableScriptsOnLoadMenuItem
|
// DisableScriptsOnLoadMenuItem
|
||||||
//
|
//
|
||||||
this.DisableScriptsOnLoadMenuItem.Name = "DisableScriptsOnLoadMenuItem";
|
this.DisableScriptsOnLoadMenuItem.Name = "DisableScriptsOnLoadMenuItem";
|
||||||
this.DisableScriptsOnLoadMenuItem.Size = new System.Drawing.Size(196, 22);
|
this.DisableScriptsOnLoadMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||||
this.DisableScriptsOnLoadMenuItem.Text = "Disable Scripts on Load";
|
this.DisableScriptsOnLoadMenuItem.Text = "Disable Scripts on Load";
|
||||||
this.DisableScriptsOnLoadMenuItem.Click += new System.EventHandler(this.DisableScriptsOnLoadMenuItem_Click);
|
this.DisableScriptsOnLoadMenuItem.Click += new System.EventHandler(this.DisableScriptsOnLoadMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -470,21 +471,21 @@
|
||||||
this.FunctionsListMenuItem,
|
this.FunctionsListMenuItem,
|
||||||
this.OnlineDocsMenuItem});
|
this.OnlineDocsMenuItem});
|
||||||
this.HelpSubMenu.Name = "HelpSubMenu";
|
this.HelpSubMenu.Name = "HelpSubMenu";
|
||||||
this.HelpSubMenu.Size = new System.Drawing.Size(44, 20);
|
this.HelpSubMenu.Size = new System.Drawing.Size(40, 20);
|
||||||
this.HelpSubMenu.Text = "&Help";
|
this.HelpSubMenu.Text = "&Help";
|
||||||
//
|
//
|
||||||
// FunctionsListMenuItem
|
// FunctionsListMenuItem
|
||||||
//
|
//
|
||||||
this.FunctionsListMenuItem.Name = "FunctionsListMenuItem";
|
this.FunctionsListMenuItem.Name = "FunctionsListMenuItem";
|
||||||
this.FunctionsListMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
this.FunctionsListMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||||
this.FunctionsListMenuItem.Size = new System.Drawing.Size(202, 22);
|
this.FunctionsListMenuItem.Size = new System.Drawing.Size(189, 22);
|
||||||
this.FunctionsListMenuItem.Text = "&Lua Functions List";
|
this.FunctionsListMenuItem.Text = "&Lua Functions List";
|
||||||
this.FunctionsListMenuItem.Click += new System.EventHandler(this.FunctionsListMenuItem_Click);
|
this.FunctionsListMenuItem.Click += new System.EventHandler(this.FunctionsListMenuItem_Click);
|
||||||
//
|
//
|
||||||
// OnlineDocsMenuItem
|
// OnlineDocsMenuItem
|
||||||
//
|
//
|
||||||
this.OnlineDocsMenuItem.Name = "OnlineDocsMenuItem";
|
this.OnlineDocsMenuItem.Name = "OnlineDocsMenuItem";
|
||||||
this.OnlineDocsMenuItem.Size = new System.Drawing.Size(202, 22);
|
this.OnlineDocsMenuItem.Size = new System.Drawing.Size(189, 22);
|
||||||
this.OnlineDocsMenuItem.Text = "Documentation online...";
|
this.OnlineDocsMenuItem.Text = "Documentation online...";
|
||||||
this.OnlineDocsMenuItem.Click += new System.EventHandler(this.OnlineDocsMenuItem_Click);
|
this.OnlineDocsMenuItem.Click += new System.EventHandler(this.OnlineDocsMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -509,20 +510,20 @@
|
||||||
this.ClearConsoleContextItem,
|
this.ClearConsoleContextItem,
|
||||||
this.RegisteredFunctionsContextItem});
|
this.RegisteredFunctionsContextItem});
|
||||||
this.ConsoleContextMenu.Name = "contextMenuStrip2";
|
this.ConsoleContextMenu.Name = "contextMenuStrip2";
|
||||||
this.ConsoleContextMenu.Size = new System.Drawing.Size(185, 48);
|
this.ConsoleContextMenu.Size = new System.Drawing.Size(176, 48);
|
||||||
this.ConsoleContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ConsoleContextMenu_Opening);
|
this.ConsoleContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ConsoleContextMenu_Opening);
|
||||||
//
|
//
|
||||||
// ClearConsoleContextItem
|
// ClearConsoleContextItem
|
||||||
//
|
//
|
||||||
this.ClearConsoleContextItem.Name = "ClearConsoleContextItem";
|
this.ClearConsoleContextItem.Name = "ClearConsoleContextItem";
|
||||||
this.ClearConsoleContextItem.Size = new System.Drawing.Size(184, 22);
|
this.ClearConsoleContextItem.Size = new System.Drawing.Size(175, 22);
|
||||||
this.ClearConsoleContextItem.Text = "&Clear";
|
this.ClearConsoleContextItem.Text = "&Clear";
|
||||||
this.ClearConsoleContextItem.Click += new System.EventHandler(this.ClearConsoleContextItem_Click);
|
this.ClearConsoleContextItem.Click += new System.EventHandler(this.ClearConsoleContextItem_Click);
|
||||||
//
|
//
|
||||||
// RegisteredFunctionsContextItem
|
// RegisteredFunctionsContextItem
|
||||||
//
|
//
|
||||||
this.RegisteredFunctionsContextItem.Name = "RegisteredFunctionsContextItem";
|
this.RegisteredFunctionsContextItem.Name = "RegisteredFunctionsContextItem";
|
||||||
this.RegisteredFunctionsContextItem.Size = new System.Drawing.Size(184, 22);
|
this.RegisteredFunctionsContextItem.Size = new System.Drawing.Size(175, 22);
|
||||||
this.RegisteredFunctionsContextItem.Text = "&Registered Functions";
|
this.RegisteredFunctionsContextItem.Text = "&Registered Functions";
|
||||||
this.RegisteredFunctionsContextItem.Click += new System.EventHandler(this.RegisteredFunctionsMenuItem_Click);
|
this.RegisteredFunctionsContextItem.Click += new System.EventHandler(this.RegisteredFunctionsMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -730,7 +731,6 @@
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.LuaListView.BlazingFast = false;
|
this.LuaListView.BlazingFast = false;
|
||||||
this.LuaListView.CheckBoxes = true;
|
|
||||||
this.LuaListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
this.LuaListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
this.Script,
|
this.Script,
|
||||||
this.PathName});
|
this.PathName});
|
||||||
|
@ -744,6 +744,7 @@
|
||||||
this.LuaListView.SelectAllInProgress = false;
|
this.LuaListView.SelectAllInProgress = false;
|
||||||
this.LuaListView.selectedItem = -1;
|
this.LuaListView.selectedItem = -1;
|
||||||
this.LuaListView.Size = new System.Drawing.Size(273, 271);
|
this.LuaListView.Size = new System.Drawing.Size(273, 271);
|
||||||
|
this.LuaListView.SmallImageList = this.imageList1;
|
||||||
this.LuaListView.TabIndex = 0;
|
this.LuaListView.TabIndex = 0;
|
||||||
this.LuaListView.UseCompatibleStateImageBehavior = false;
|
this.LuaListView.UseCompatibleStateImageBehavior = false;
|
||||||
this.LuaListView.UseCustomBackground = true;
|
this.LuaListView.UseCustomBackground = true;
|
||||||
|
@ -762,6 +763,14 @@
|
||||||
this.PathName.Text = "Path";
|
this.PathName.Text = "Path";
|
||||||
this.PathName.Width = 195;
|
this.PathName.Width = 195;
|
||||||
//
|
//
|
||||||
|
// imageList1
|
||||||
|
//
|
||||||
|
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||||
|
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||||
|
this.imageList1.Images.SetKeyName(0, "StopButton.png");
|
||||||
|
this.imageList1.Images.SetKeyName(1, "PlayButton.png");
|
||||||
|
this.imageList1.Images.SetKeyName(2, "Pause.png");
|
||||||
|
//
|
||||||
// splitContainer1
|
// splitContainer1
|
||||||
//
|
//
|
||||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
@ -889,5 +898,6 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem DuplicateScriptMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem DuplicateScriptMenuItem;
|
||||||
private System.Windows.Forms.TextBox InputBox;
|
private System.Windows.Forms.TextBox InputBox;
|
||||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||||
|
private System.Windows.Forms.ImageList imageList1;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -54,6 +54,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
LuaListView.QueryItemText += LuaListView_QueryItemText;
|
LuaListView.QueryItemText += LuaListView_QueryItemText;
|
||||||
LuaListView.QueryItemBkColor += LuaListView_QueryItemBkColor;
|
LuaListView.QueryItemBkColor += LuaListView_QueryItemBkColor;
|
||||||
|
LuaListView.QueryItemImage += LuaListView_QueryItemImage;
|
||||||
|
LuaListView.QueryItemIndent += LuaListView_QueryItemIndent;
|
||||||
LuaListView.VirtualMode = true;
|
LuaListView.VirtualMode = true;
|
||||||
|
|
||||||
LuaSandbox.SetLogger(this.ConsoleLog);
|
LuaSandbox.SetLogger(this.ConsoleLog);
|
||||||
|
@ -137,10 +139,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
LuaSandbox.Sandbox(() =>
|
LuaSandbox.Sandbox(() =>
|
||||||
{
|
{
|
||||||
file.Thread = LuaImp.SpawnCoroutine(file.Path);
|
file.Thread = LuaImp.SpawnCoroutine(file.Path);
|
||||||
file.Enabled = true;
|
file.State = LuaFile.RunState.Running;
|
||||||
}, () =>
|
}, () =>
|
||||||
{
|
{
|
||||||
file.Enabled = false;
|
file.State = LuaFile.RunState.Disabled;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -172,10 +174,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
LuaSandbox.Sandbox(() =>
|
LuaSandbox.Sandbox(() =>
|
||||||
{
|
{
|
||||||
luaFile.Thread = LuaImp.SpawnCoroutine(processedPath);
|
luaFile.Thread = LuaImp.SpawnCoroutine(processedPath);
|
||||||
luaFile.Enabled = true;
|
luaFile.State = LuaFile.RunState.Running;
|
||||||
}, () =>
|
}, () =>
|
||||||
{
|
{
|
||||||
luaFile.Enabled = false;
|
luaFile.State = LuaFile.RunState.Disabled;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -185,10 +187,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
luaFile.Enabled = false;
|
luaFile.State = LuaFile.RunState.Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFile.Paused = false;
|
//luaFile.Paused = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -225,7 +227,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
file.Thread = LuaImp.SpawnCoroutine(file.Path);
|
file.Thread = LuaImp.SpawnCoroutine(file.Path);
|
||||||
}, () =>
|
}, () =>
|
||||||
{
|
{
|
||||||
file.Enabled = false;
|
file.State = LuaFile.RunState.Disabled;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -247,6 +249,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Path.GetFileName(_luaList.Filename);
|
Path.GetFileName(_luaList.Filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void LuaListView_QueryItemImage(int item, int subItem, out int imageIndex)
|
||||||
|
{
|
||||||
|
imageIndex = -1;
|
||||||
|
if (subItem != 0) return;
|
||||||
|
if (_luaList[item].Paused) imageIndex = 2;
|
||||||
|
else if (_luaList[item].Enabled) imageIndex = 1;
|
||||||
|
else imageIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaListView_QueryItemIndent(int item, out int itemIndent)
|
||||||
|
{
|
||||||
|
itemIndent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
private void LuaListView_QueryItemBkColor(int index, int column, ref Color color)
|
private void LuaListView_QueryItemBkColor(int index, int column, ref Color color)
|
||||||
{
|
{
|
||||||
if (column == 0)
|
if (column == 0)
|
||||||
|
@ -261,7 +278,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else if (_luaList[index].Enabled && _luaList[index].Paused)
|
else if (_luaList[index].Enabled && _luaList[index].Paused)
|
||||||
{
|
{
|
||||||
color = Color.IndianRed;
|
color = Color.LightPink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,7 +288,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private void LuaListView_QueryItemText(int index, int column, out string text)
|
private void LuaListView_QueryItemText(int index, int column, out string text)
|
||||||
{
|
{
|
||||||
text = string.Empty;
|
text = string.Empty;
|
||||||
|
|
||||||
if (column == 0)
|
if (column == 0)
|
||||||
{
|
{
|
||||||
text = Path.GetFileNameWithoutExtension(_luaList[index].Path); // TODO: how about allow the user to name scripts?
|
text = Path.GetFileNameWithoutExtension(_luaList[index].Path); // TODO: how about allow the user to name scripts?
|
||||||
|
@ -439,7 +455,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}, () =>
|
}, () =>
|
||||||
{
|
{
|
||||||
lf.Enabled = false;
|
lf.State = LuaFile.RunState.Disabled;
|
||||||
lf.Thread = null;
|
lf.Thread = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -731,7 +747,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
item.Thread = LuaImp.SpawnCoroutine(item.Path);
|
item.Thread = LuaImp.SpawnCoroutine(item.Path);
|
||||||
}, () =>
|
}, () =>
|
||||||
{
|
{
|
||||||
item.Enabled = false;
|
item.State = LuaFile.RunState.Disabled;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -763,6 +779,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateDialog();
|
UpdateDialog();
|
||||||
|
UpdateNumberOfScripts();
|
||||||
|
LuaListView.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PauseScriptMenuItem_Click(object sender, EventArgs e)
|
private void PauseScriptMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
|
@ -133,17 +133,89 @@
|
||||||
<data name="OpenScriptToolbarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="OpenScriptToolbarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJQSURBVDhPlZNdSNNRGMb/F110ZZEVhVBgeeHNICiiuggp
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJHSURBVDhPxZBdSNNhFMb/F110ZZEVhVBgeeHNICiiuggp
|
||||||
olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdPKMgr7kApFItTUkWZqVhSVYmao5Nev/xyoQ4k88Nyc
|
olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdNKMwr7kApFItTUkWZqVhSVYmao5Nevvy7UoYR3HXh4
|
||||||
8z6/93nP4QjCfy6lwc4ltZVso4P/tMyXRcmMHqZ0EeY6jZQVInzuf0e1Tb9Ina3P/tkpLD6XkNg8BJe5
|
4XCe33nOKyy3lAY7l9RWMo0O/raWXxEyo5spVYTNvOGyfIRPfW+ptOkXqaPl6T83hcRmExSdgzAz3NVm
|
||||||
u93C+HDVrP4M2ZkcMOOw5tLZ9nxJyJE4HSExBoKkBQhVpTrGhso9zNPfiph0JlB+U01ZcRbmwnRMeWlc
|
YWyoYla/B+1M9JtxWLPpaH22JORIjI6gKAMB0jyEimIdo4OlbuaprwVMOOMovammpDADc34qppwUrmnl
|
||||||
08opUCV6QissGsZ+WOY6z4hmuuXglC6pRYBbJSp+fzXNxnaZ66o1s3rkyKHWruJuWRYOcwZ2kxKr8TI3
|
5Kni3aFlFg2j3y1z5mnRTJccnNIltQhwq0jFry+mOXNtpWZWDx1Z1NhV3C3JwGFOw25SYjVe5oYhiUKd
|
||||||
DCkU6+QYNUnuNGWmLEY+5uOK3degoKZcx3SfEvozPfVB3OtNhi4ZvI2nrTIc23U9gtmYwa8eNXzScq8i
|
HKMmwQUrMWUw/CF3NnZvvYKqUh1TvUroS3fXe7HXkwidMngTS2t5KLbregSzMY2f3Wr4qKW6LJvGR1rX
|
||||||
l6bHWnfRwhHeREJzGFONgYw/CeB9qQSZNNR9FyUGBT87lfQ3plJj1zLTq4COGDegLVo0HmeqKZjx+gOM
|
0MLor8OhKYTJBn/GHvvxrliCTBrsOqXIoOBHh5K+hmSq7FqmexTQHuUytkaKxuNMNgYyVneA4Qd7GKjc
|
||||||
PNzDYPU2lLF+4jhyN6BIl8pgexK3bRpaXopJuhJEwGloiWDmVSgTLw4xWreXoZrtfK/wp/nKak4E+s6/
|
hjLaRzxH7gIU6JIZaEvgtk1D8wsxSWecCDgNzWFMvwxm/PkhRmr3Mli1nW9lvjRdWc0Jf+/5jzRmyWmv
|
||||||
hDFHTkd9GndsOdCTBq1i3NdHmWgIYvRpAMO1OxlwSPhi2YpT641CuoWzsSfnAfnZiVRZ1Tjvx9GsF+bU
|
S+GOLQu6U6BFjPvqKOP1AYw88WOoZif9DgmfLVtxaj1RSLdwNvrkPCA3M54KqxrnvRia9MKcGrUrqFOt
|
||||||
pF1BvWolD9JXUZmyDnOiD1cvbCZiYXfXCPrMi+gVZ8hOiiL53DHORwdzKnw/hw/uYt9uCTskfvj7+rBp
|
5H7qKsqT1mGO9+Lqhc2ELdw+U/r0i+gVZ8hMiCDx3DHORwZyKnQ/hw/uYt9uCTskPvh6e7Fp41rWr/Fg
|
||||||
41rWr/Fig7fX8j/Tsn/fcgx/ARfG3ml6M3rzAAAAAElFTkSuQmCC
|
g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>489, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
|
||||||
|
DgAAAk1TRnQBSQFMAgEBAwEAASABAAEgAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||||
|
AwABEAMAAQEBAAEgBgABECoAAo8BmAHlAbIBtAHSAf8BuwG+AdcB/wKQAZkB5zAAAY8BmAGQAeUBsgHS
|
||||||
|
AbYB/wG7AdcBvgH/AZABmQGRAecwAAGYAZMBjwHlAdIBvgGyAf8B1wHFAbsB/wGZAZIBkAHnaAABbwF0
|
||||||
|
AaAB9QE5AUABlwH/AQUBEAGHAf8BBgEQAYcB/wEEAQ8BhwH/AQsBFQGIAf8BDgEYAYkB/wFmAWoBoQH5
|
||||||
|
IAABbwGgAXsB9QE5AZcBRQH/AQUBhwEUAf8BBgGHARUB/wEEAYcBEgH/AQsBiAEZAf8BDgGJARwB/wFm
|
||||||
|
AaEBagH5IAABoAGFAW8B9QGXAVsBOQH/AYcBMwEFAf8BhwE0AQYB/wGHATIBBAH/AYgBNwELAf8BiQE6
|
||||||
|
AQ4B/wGhAXoBZgH5XAABNAE8AZgB/wExATkBmAH/AbABsgHLAf8B2gHbAdoB/wLRAdUB/wHLAcwB0gH/
|
||||||
|
AcQBxwHOAf8BWAFeAaUB/wFKAVEBjgH5ASkBMgGPAf8YAAEmAZIBMgH/ATEBmAE9Af8BsAHLAbMB/wHb
|
||||||
|
AtoB/wHRAdUB0gH/AcsB0gHLAf8BxQHOAcQB/wFYAaUBYQH/AUoBjgFSAfkBKQGPATQB/xgAAZIBTAEm
|
||||||
|
Af8BmAFWATEB/wHLAboBsAH/AtoB2wH/AdUB0wHRAf8B0gHNAcsB/wHOAcYBxAH/AaUBcwFYAf8BjgFo
|
||||||
|
AUoB+QGPAUwBKQH/VAABPQFAAZMB/QKMAZMB4wL+Af0B/wH+Af0B9QH/AvcB8wH/Ae8C7gH/Au0B6wH/
|
||||||
|
AdkC2wH/AeMB5AHiAf8CwAHMAf8BdwF6AY0B7QFGAUwBkAH7EAABPQGTAUAB/QGMAZMBjAHjAf8B/gL/
|
||||||
|
Af4B9QH9Af8B9wHzAfYB/wLuAe8B/wHtAesB7QH/AtsB2QH/AeQB4gHjAf8BwAHMAcIB/wF3AY0BegHt
|
||||||
|
AUYBkAFQAfsQAAGTAVMBPQH9AZMBjQGMAeMB/gP/AfUB+wH+Af8B8wH1AfcB/wHuAe8B7gH/AesB7AHt
|
||||||
|
Af8B2wHZAdoB/wLiAeQB/wHMAcUBwAH/AY0BgAF3Ae0BkAFfAUYB+0wAAXIBewGeAfMBiwGMAZ0B6wX/
|
||||||
|
Af4B/Rf/Af4B/wHwAe8B8AH/Ac8B0AHWAf8BbgFxAYkB7QF2AXsBlAHvCAABcgGeAXwB8wGLAZ0BjgHr
|
||||||
|
Bf8B/Qb/AeMB8AHjAf8BnAHNAZwK/wH+Av8B7wLwAf8BzwHWAc8B/wFuAYkBcgHtAXYBlAF7Ae8IAAGe
|
||||||
|
AYQBcgHzAZ0BkQGLAesE/wH9F/8B/gP/AuMB4AH/Ac8ByQHHAf8BiQF5AW4B7QGUAYMBdgHvSAACagGp
|
||||||
|
AfkD/iX/AfAB8gHwAf8CxgHNAf8CRwGKAfkIAAFqAakBawH5EP8B3AHtAdwB/wERAXkBEQH/AYMBwQGD
|
||||||
|
Df8B8gHxAfAB/wHHAc4ByAH/AUcBigFNAfkIAAGpAYQBagH5DP8B4QHNAb4B/wG+AZIBjQH/AfcB8QHv
|
||||||
|
Af8B+wH4AfcB/wHBAZgBjwH/AeoB2gHRBf8B5QHiAeYB/wHOAcoBxwH/AYoBYgFHAflEAAGGAYkBrQHz
|
||||||
|
Ao4BpQHtCP8C9QH7Af8BbQFpAdQB/wGhAZ8B5wH/AaMBoQHmAf8BogGhAeUB/wGUAZEB4QH/AZ4BnAHm
|
||||||
|
Bf8B+QH4AfcB/wHnAeQB3gH/AWABZgGRAfUBWgFfAZwB+wGGAa0BjAHzAY4BpgGSAe0Q/wHkAfEB5AH/
|
||||||
|
AQEBdQEBAf8BEQF7AREB/wGcAc4BnAn/AfkB9wH5Af8B5gHeAecB/wFgAZEBbAH1AVoBnAFfAfsBrQGV
|
||||||
|
AYYB8wGmAZcBjgHtDP8BrgF2AVQB/wFZAgAB/wH4AfUB8gH/AfoB9wH1Af8BWQIAAf8BswF7AVoF/wHx
|
||||||
|
AfQB9QH/Ad4B5gHnAf8BkQFxAWAB9QGcAW0BWgH7QAABggGIAcoB/wHQAdIB7Qn/AvUB+gH/ATsBOAG7
|
||||||
|
Af8BZwFkAd4B/wFkAWAB2AH/AV8BWwHTAf8BUwFOAdEB/wGiAaEB6QX/AvkB+AH/AfwB+wHqAf8BowGm
|
||||||
|
Ab4B/wFDAUoBoAH/AYIBygGKAf8B0AHtAdQR/wHiAfAB4gH/AQIBdgECAf8BAAF2AQAB/wERAYQBEQH/
|
||||||
|
AZgBzAGYBf8B+QH4AfkB/wH8AeoB+gH/AaMBvgGlAf8BQwGgAU4B/wHKAZwBggH/Ae0B2wHQDf8BugGM
|
||||||
|
AWoB/wGNASIBAAL/Av4B/wP+Af8BjQEhAQAB/wG7AYkBaAX/AfIB9AH1Af8B6gH1AfwB/wG+AawBowH/
|
||||||
|
AaABZAFDAf9AAAF0AXoBwgH/AeUB5gH0Cf8C9wH7Af8BSgFHAcMB/wF1AXMB4wH/AXABbQHdAf8BawFo
|
||||||
|
AdgB/wFfAVoB0wH/AasBqQHqBf8D+QH/Af4B+wHvAf8BtAG2AcUB/wFBAUkBnwH/AXQBwgGBAf8B5QH0
|
||||||
|
AecR/wHiAfAB4gH/AQEBeAEBAf8BAAF6AQAB/wEAAXIBAAH/AREBhAERAf8B+gH8AfoB/wP5Af8B/gHv
|
||||||
|
Af4B/wG0AcUBtgH/AUEBnwFMAf8BwgGTAXQB/wH0AesB5Q3/AbkBjAFrAf8BpwE4AQsB/wH7AfkB+AH/
|
||||||
|
AfsB+gH5Af8BpwE4AQsB/wG9AYwBawX/A/QB/wHvAfoB/gH/AcUBugG0Af8BnwFiAUEB/0AAAXABdwG9
|
||||||
|
Af8C2gHvCf8C9wH7Af8BTgFLAccB/wF7AXkB6gH/AXYBdQHjAf8BcwFxAd8B/wFmAWMB2gH/Aa0BqwHr
|
||||||
|
Bf8C+gH4Af8B/QH8Ae4B/wGdAaABuwH/AUkBUQGjAf8BcAG9AXgB/wHaAe8B3hH/AeIB8AHiAf8BAgF4
|
||||||
|
AQIB/wEAAXABAAH/ASwBjgEsAf8B4gHwAeIF/wH6AfgB+gH/Af0B7gH7Af8BnQG7AaEB/wFJAaMBUgH/
|
||||||
|
Ab0BjgFwAf8B7wHjAdoN/wG3AYgBZgH/AcQBRwEkAf8C/QH8Af8B/AH6AfkB/wHGAUoBJgH/AcIBjwFw
|
||||||
|
Bf8B8gH1AfcB/wHuAfcB/QH/AbsBqAGdAf8BowFoAUkB/0AAAYcBjAGkAe8BlAGVAbIB8Qj/AvYB+wH/
|
||||||
|
AUsBRwHFAf8BegF5AesB/wF2AXUB5AH/AXQBcQHhAf8BZAFhAdsB/wGpAacB6wX/AvsB+QH/AfsB/AHu
|
||||||
|
Af8BSAFOAZQB+wGCAYMBnwHvAYcBpAGMAe8BlAGyAZkB8RD/AeIB8AHiAf8BAAFuAQAB/wEoAYcBKAH/
|
||||||
|
AecB8wHnCf8B+wH5AfsB/wH8Ae4B+QH/AUgBlAFSAfsBggGfAYYB7wGkAZIBhwHvAbIBoAGUAfEM/wHB
|
||||||
|
AZcBegH/AaQBPgEWAf8B/QH7AfoB/wH8AfoB+QH/AZMBOQEPAf8BzAGpAZQF/wH0AfcB+QH/Ae4B9QH8
|
||||||
|
Af8BlAFfAUgB+wGfAYwBggHvRAABewGBAc8J/wLzAfkB/wFJAUYBuQH/AYcBhgHWAf8BhwGFAdUB/wGH
|
||||||
|
AYUB1QH/AWUBYgHIAf8BbQFsAcwG/wH+AfwB/wLOAdcB/wE5AUEBmAH/CAABewHPAY0R/wHTAegB0wH/
|
||||||
|
ASQBhwEkAf8B4gHwAeIN/wH+AfwC/wHOAdcB0AH/ATkBmAFDAf8IAAHPAaEBeyn/AfsD/wHXAdIBzgH/
|
||||||
|
AZgBWgE5Af9IAAGMAY0BwgH5AqABvAHxJP8B/AH7AfYB/wE3AT8BlgH/AYoBiwGbAekIAAGMAcIBkAH5
|
||||||
|
AaABvAGmAfEM/wH6AfwB+gH/Ae8B9gHvEf8B/AH2AfwB/wE3AZYBQQH/AYoBmwGKAekIAAHCAZ4BjAH5
|
||||||
|
AbwBrQGgAfEk/wH1AfoB/AH/AZYBWAE3Af8BmwGRAYoB6UwAAYMBiQHMAf0CnAGpAekc/wHyAfUB+AH/
|
||||||
|
AV4BaAGTAfUBcQF4AaMB9RAAAYMBzAGOAf0BnAGqAZ0B6Rz/AfQB+AHyAf8BXgGTAWgB9QFxAaMBfwH1
|
||||||
|
EAABzAGjAYMB/QGqAaMBnAHpHP8B+ALyAf8BkwFvAV4B9QGjAYYBcQH1VAABhgGMAcgB+wGVAZcBzgH5
|
||||||
|
AtMB9wH/AfEB8AH7Af8B9gH3Av8B9wH4Af0B/wHkAecB8wH/AYMBhgGiAe8BfwGBAaEB8wGPAZABogHr
|
||||||
|
GAABhgHIAZAB+wGVAc4BoQH5AdMB9wHaAf8B8AH7AfMB/wH2Af8B9wH/AfcB/QH4Af8B5AHzAeQB/wGD
|
||||||
|
AaIBhgHvAX8BoQGCAfMBjwGiAZAB6xgAAcgBmwGGAfsBzgGwAZUB+QH3AeMB0wH/AfsB9gHwAv8B+QH2
|
||||||
|
Af8B/QH5AfcB/wHzAegB5AH/AaIBjwGDAe8BoQGMAX8B8wGiAZcBjwHrXAACmAGrAesBjQGTAdcB/wGO
|
||||||
|
AZQB3QH/AY8BlQHgAf8BjQGUAdsB/wGaAZ8B2gH/AZIBkwGeAeckAAGYAasBmgHrAY0B1wGWAf8BjgHd
|
||||||
|
AZgB/wGPAeABmQH/AY0B2wGWAf8BmgHaAaIB/wGSAZ4BlQHnJAABqwGhAZgB6wHXAagBjQH/Ad0BrAGO
|
||||||
|
Af8B4AGtAY8B/wHbAakBjQH/AdoBsgGaAf8BngGYAZIB51QAAUIBTQE+BwABPgMAASgDAAFAAwABEAMA
|
||||||
|
AQEBAAEBBQABgBcAA/8BAAH8AT8B/AE/AfwBPwIAAfABDwHwAQ8B8AEPAgAB4AEHAeABBwHgAQcCAAHA
|
||||||
|
AQMBwAEDAcABAwIAAYABAQGAAQEBgAEBAgABgAEBAYABAQGAAQEqAAGAAQEBgAEBAYABAQIAAYABAQGA
|
||||||
|
AQEBgAEBAgABwAEDAcABAwHAAQMCAAHgAQcB4AEHAeABBwIAAfABHwHwAR8B8AEfAgAL
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
|
|
@ -2143,10 +2143,9 @@
|
||||||
// pnDetailsPaletteColor
|
// pnDetailsPaletteColor
|
||||||
//
|
//
|
||||||
this.pnDetailsPaletteColor.BackColor = System.Drawing.Color.Red;
|
this.pnDetailsPaletteColor.BackColor = System.Drawing.Color.Red;
|
||||||
this.pnDetailsPaletteColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
this.pnDetailsPaletteColor.Location = new System.Drawing.Point(6, 6);
|
||||||
this.pnDetailsPaletteColor.Location = new System.Drawing.Point(3, 4);
|
|
||||||
this.pnDetailsPaletteColor.Name = "pnDetailsPaletteColor";
|
this.pnDetailsPaletteColor.Name = "pnDetailsPaletteColor";
|
||||||
this.pnDetailsPaletteColor.Size = new System.Drawing.Size(69, 68);
|
this.pnDetailsPaletteColor.Size = new System.Drawing.Size(64, 64);
|
||||||
this.pnDetailsPaletteColor.TabIndex = 3;
|
this.pnDetailsPaletteColor.TabIndex = 3;
|
||||||
this.pnDetailsPaletteColor.DoubleClick += new System.EventHandler(this.pnDetailsPaletteColor_DoubleClick);
|
this.pnDetailsPaletteColor.DoubleClick += new System.EventHandler(this.pnDetailsPaletteColor_DoubleClick);
|
||||||
//
|
//
|
||||||
|
|
|
@ -978,10 +978,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
//view a BG tile
|
//view a BG tile
|
||||||
int paletteStart = 0;
|
int paletteStart = 0;
|
||||||
var bmp = new Bitmap(8, 8, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
|
||||||
var bmpdata = bmp.LockBits(new Rectangle(0, 0, 8, 8), System.Drawing.Imaging.ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
|
||||||
var bgs = currMapEntryState;
|
var bgs = currMapEntryState;
|
||||||
var oneTileEntry = new SNESGraphicsDecoder.TileEntry[] { bgs.entry };
|
var oneTileEntry = new SNESGraphicsDecoder.TileEntry[] { bgs.entry };
|
||||||
|
int tileSize = si.BG[bgs.bgnum].TileSize;
|
||||||
|
int pixels = tileSize * tileSize;
|
||||||
|
|
||||||
|
var bmp = new Bitmap(tileSize, tileSize, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||||
|
var bmpdata = bmp.LockBits(new Rectangle(0, 0, tileSize, tileSize), System.Drawing.Imaging.ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||||
|
|
||||||
if (viewBgMode == SNESGraphicsDecoder.BGMode.Mode7)
|
if (viewBgMode == SNESGraphicsDecoder.BGMode.Mode7)
|
||||||
gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, false, 1, currMapEntryState.entry.tilenum, 1);
|
gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, false, 1, currMapEntryState.entry.tilenum, 1);
|
||||||
|
@ -991,9 +994,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, true, 1, currMapEntryState.entry.tilenum, 1);
|
gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, true, 1, currMapEntryState.entry.tilenum, 1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gd.DecodeBG((int*)bmpdata.Scan0, bmpdata.Stride / 4, oneTileEntry, si.BG[bgs.bgnum].TiledataAddr, SNESGraphicsDecoder.ScreenSize.Hacky_1x1, si.BG[bgs.bgnum].Bpp, 8, paletteStart);
|
gd.DecodeBG((int*)bmpdata.Scan0, bmpdata.Stride / 4, oneTileEntry, si.BG[bgs.bgnum].TiledataAddr, SNESGraphicsDecoder.ScreenSize.Hacky_1x1, si.BG[bgs.bgnum].Bpp, tileSize, paletteStart);
|
||||||
gd.Paletteize((int*)bmpdata.Scan0, 0, 0, 64);
|
gd.Paletteize((int*)bmpdata.Scan0, 0, 0, pixels);
|
||||||
gd.Colorize((int*)bmpdata.Scan0, 0, 64);
|
gd.Colorize((int*)bmpdata.Scan0, 0, pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
bmp.UnlockBits(bmpdata);
|
bmp.UnlockBits(bmpdata);
|
||||||
|
@ -1160,7 +1163,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (bg.TileSize == 16) { tx /= 2; ty /= 2; } //worry about this later. need to pass a different flag into `currViewingTile`
|
if (bg.TileSize == 16) { tx /= 2; ty /= 2; } //worry about this later. need to pass a different flag into `currViewingTile`
|
||||||
|
|
||||||
int tloc = ty * bg.ScreenSizeInTiles.Width + tx;
|
int tloc = ty * bg.ScreenSizeInTiles.Width + tx;
|
||||||
if (tloc > map.Length) break;
|
if (tx >= bg.ScreenSizeInTiles.Width) break;
|
||||||
|
if (ty >= bg.ScreenSizeInTiles.Height) break;
|
||||||
|
if (tx < 0) break;
|
||||||
|
if (ty < 0) break;
|
||||||
|
|
||||||
currMapEntryState = new MapEntryState();
|
currMapEntryState = new MapEntryState();
|
||||||
currMapEntryState.bgnum = (int)CurrDisplaySelection;
|
currMapEntryState.bgnum = (int)CurrDisplaySelection;
|
||||||
|
|
|
@ -71,8 +71,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int CurrentBranch = -1;
|
|
||||||
|
|
||||||
private void QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
private void QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||||
{
|
{
|
||||||
text = string.Empty;
|
text = string.Empty;
|
||||||
|
@ -102,7 +100,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (branch != null)
|
if (branch != null)
|
||||||
{
|
{
|
||||||
var record = Tastudio.CurrentTasMovie[branch.Frame];
|
var record = Tastudio.CurrentTasMovie[branch.Frame];
|
||||||
if (index == CurrentBranch)
|
if (index == Movie.CurrentBranch)
|
||||||
color = TAStudio.CurrentFrame_InputLog; // SystemColors.HotTrack;
|
color = TAStudio.CurrentFrame_InputLog; // SystemColors.HotTrack;
|
||||||
else if (record.Lagged.HasValue)
|
else if (record.Lagged.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -147,9 +145,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (SelectedBranch != null)
|
if (SelectedBranch != null)
|
||||||
{
|
{
|
||||||
int index = BranchView.SelectedRows.First();
|
int index = BranchView.SelectedRows.First();
|
||||||
//if (CurrentBranch == index) // if the current branch was edited, we should allow loading it. some day there might be a proper check
|
//if (Movie.CurrentBranch == index) // if the current branch was edited, we should allow loading it. some day there might be a proper check
|
||||||
// return;
|
// return;
|
||||||
CurrentBranch = index;
|
Movie.CurrentBranch = index;
|
||||||
LoadBranch(SelectedBranch);
|
LoadBranch(SelectedBranch);
|
||||||
BranchView.Refresh();
|
BranchView.Refresh();
|
||||||
}
|
}
|
||||||
|
@ -168,13 +166,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (SelectedBranch != null)
|
if (SelectedBranch != null)
|
||||||
{
|
{
|
||||||
int index = BranchView.SelectedRows.First();
|
int index = BranchView.SelectedRows.First();
|
||||||
if (index == CurrentBranch)
|
if (index == Movie.CurrentBranch)
|
||||||
{
|
{
|
||||||
CurrentBranch = -1;
|
Movie.CurrentBranch = -1;
|
||||||
}
|
}
|
||||||
else if (index < CurrentBranch)
|
else if (index < Movie.CurrentBranch)
|
||||||
{
|
{
|
||||||
CurrentBranch--;
|
Movie.CurrentBranch--;
|
||||||
}
|
}
|
||||||
|
|
||||||
Movie.RemoveBranch(SelectedBranch);
|
Movie.RemoveBranch(SelectedBranch);
|
||||||
|
@ -220,7 +218,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
TasBranch branch = CreateBranch();
|
TasBranch branch = CreateBranch();
|
||||||
Movie.AddBranch(branch);
|
Movie.AddBranch(branch);
|
||||||
BranchView.RowCount = Movie.BranchCount;
|
BranchView.RowCount = Movie.BranchCount;
|
||||||
CurrentBranch = Movie.BranchCount - 1;
|
Movie.CurrentBranch = Movie.BranchCount - 1;
|
||||||
BranchView.Refresh();
|
BranchView.Refresh();
|
||||||
Tastudio.RefreshDialog();
|
Tastudio.RefreshDialog();
|
||||||
}
|
}
|
||||||
|
@ -302,7 +300,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (SelectedBranch != null)
|
if (SelectedBranch != null)
|
||||||
{
|
{
|
||||||
UpdateBranch(SelectedBranch);
|
UpdateBranch(SelectedBranch);
|
||||||
CurrentBranch = BranchView.SelectedRows.First();
|
Movie.CurrentBranch = BranchView.SelectedRows.First();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,14 +39,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (AutoadjustInputMenuItem.Checked)
|
if (AutoadjustInputMenuItem.Checked)
|
||||||
refreshNeeded = AutoAdjustInput();
|
refreshNeeded = AutoAdjustInput();
|
||||||
|
|
||||||
|
if (TasView.RowCount != CurrentTasMovie.InputLogLength + 1)
|
||||||
|
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
|
||||||
|
|
||||||
MaybeFollowCursor();
|
MaybeFollowCursor();
|
||||||
|
|
||||||
if (TasView.IsPartiallyVisible(Global.Emulator.Frame) || TasView.IsPartiallyVisible(lastRefresh))
|
if (TasView.IsPartiallyVisible(Global.Emulator.Frame) || TasView.IsPartiallyVisible(lastRefresh))
|
||||||
refreshNeeded = true;
|
refreshNeeded = true;
|
||||||
|
|
||||||
RefreshDialog(refreshNeeded);
|
RefreshDialog(refreshNeeded);
|
||||||
if (!refreshNeeded && TasView.RowCount != CurrentTasMovie.InputLogLength + 1) // Perhaps not the best place to put this.
|
|
||||||
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FastUpdate()
|
public void FastUpdate()
|
||||||
|
|
|
@ -189,7 +189,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else if (record.Lagged.HasValue)
|
else if (record.Lagged.HasValue)
|
||||||
{
|
{
|
||||||
if (!CurrentTasMovie.TasStateManager.HasState(index) && TasView.denoteStatesWithBGColor)
|
if (!record.HasState && TasView.denoteStatesWithBGColor)
|
||||||
color = record.Lagged.Value ?
|
color = record.Lagged.Value ?
|
||||||
LagZone_InputLog :
|
LagZone_InputLog :
|
||||||
GreenZone_InputLog;
|
GreenZone_InputLog;
|
||||||
|
@ -200,9 +200,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else if (record.WasLagged.HasValue)
|
else if (record.WasLagged.HasValue)
|
||||||
{
|
{
|
||||||
|
if (!record.HasState && TasView.denoteStatesWithBGColor)
|
||||||
color = record.WasLagged.Value ?
|
color = record.WasLagged.Value ?
|
||||||
LagZone_InputLog_Invalidated :
|
LagZone_InputLog_Invalidated :
|
||||||
GreenZone_InputLog_Invalidated;
|
GreenZone_InputLog_Invalidated;
|
||||||
|
else
|
||||||
|
color = record.WasLagged.Value ?
|
||||||
|
LagZone_InputLog_Stated :
|
||||||
|
GreenZone_InputLog_Stated;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -579,6 +584,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (TasView.RightButtonHeld && TasView.CurrentCell.RowIndex.HasValue)
|
if (TasView.RightButtonHeld && TasView.CurrentCell.RowIndex.HasValue)
|
||||||
{
|
{
|
||||||
_supressContextMenu = true;
|
_supressContextMenu = true;
|
||||||
|
int notch = e.Delta / 120;
|
||||||
|
|
||||||
if (GlobalWin.MainForm.IsSeeking)
|
if (GlobalWin.MainForm.IsSeeking)
|
||||||
{
|
{
|
||||||
if (e.Delta < 0)
|
if (e.Delta < 0)
|
||||||
|
@ -595,10 +602,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e.Delta < 0)
|
GoToFrame(Emulator.Frame - notch);
|
||||||
GoToNextFrame();
|
|
||||||
else
|
|
||||||
GoToPreviousFrame();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
DrawInput = true;
|
DrawInput = true;
|
||||||
AutoPause = true;
|
AutoPause = true;
|
||||||
FollowCursor = true;
|
FollowCursor = true;
|
||||||
ScrollSpeed = 1;
|
ScrollSpeed = 3;
|
||||||
FollowCursorAlwaysScroll = false;
|
FollowCursorAlwaysScroll = false;
|
||||||
FollowCursorScrollMethod = "near";
|
FollowCursorScrollMethod = "near";
|
||||||
// default to taseditor fashion
|
// default to taseditor fashion
|
||||||
|
@ -237,6 +237,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
BranchesMarkersSplit.SplitterDistance = Settings.BranchMarkerSplitDistance;
|
BranchesMarkersSplit.SplitterDistance = Settings.BranchMarkerSplitDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GoToFrame(CurrentTasMovie.Session.CurrentFrame);
|
||||||
|
CurrentTasMovie.CurrentBranch = CurrentTasMovie.Session.CurrentBranch;
|
||||||
|
|
||||||
////////////////
|
////////////////
|
||||||
|
|
||||||
RefreshDialog();
|
RefreshDialog();
|
||||||
|
|
|
@ -610,6 +610,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
tool.FastUpdate();
|
tool.FastUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Global.Config.RunLuaDuringTurbo && Has<LuaConsole>())
|
||||||
|
{
|
||||||
|
LuaConsole.EndLuaDrawing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsAvailable<T>()
|
public bool IsAvailable<T>()
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,6 +33,7 @@
|
||||||
this.WatchCountLabel = new System.Windows.Forms.Label();
|
this.WatchCountLabel = new System.Windows.Forms.Label();
|
||||||
this.MemDomainLabel = new System.Windows.Forms.Label();
|
this.MemDomainLabel = new System.Windows.Forms.Label();
|
||||||
this.ListViewContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.ListViewContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.EditContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.EditContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.RemoveContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.RemoveContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.DuplicateContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.DuplicateContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -144,6 +145,7 @@
|
||||||
// ListViewContextMenu
|
// ListViewContextMenu
|
||||||
//
|
//
|
||||||
this.ListViewContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.ListViewContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.newToolStripMenuItem,
|
||||||
this.EditContextMenuItem,
|
this.EditContextMenuItem,
|
||||||
this.RemoveContextMenuItem,
|
this.RemoveContextMenuItem,
|
||||||
this.DuplicateContextMenuItem,
|
this.DuplicateContextMenuItem,
|
||||||
|
@ -159,9 +161,17 @@
|
||||||
this.MoveUpContextMenuItem,
|
this.MoveUpContextMenuItem,
|
||||||
this.MoveDownContextMenuItem});
|
this.MoveDownContextMenuItem});
|
||||||
this.ListViewContextMenu.Name = "contextMenuStrip1";
|
this.ListViewContextMenu.Name = "contextMenuStrip1";
|
||||||
this.ListViewContextMenu.Size = new System.Drawing.Size(191, 280);
|
this.ListViewContextMenu.Size = new System.Drawing.Size(191, 324);
|
||||||
this.ListViewContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ListViewContextMenu_Opening);
|
this.ListViewContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ListViewContextMenu_Opening);
|
||||||
//
|
//
|
||||||
|
// newToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.newToolStripMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.addWatch;
|
||||||
|
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||||
|
this.newToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
|
||||||
|
this.newToolStripMenuItem.Text = "&New Watch";
|
||||||
|
this.newToolStripMenuItem.Click += new System.EventHandler(this.NewWatchMenuItem_Click);
|
||||||
|
//
|
||||||
// EditContextMenuItem
|
// EditContextMenuItem
|
||||||
//
|
//
|
||||||
this.EditContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
|
this.EditContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
|
||||||
|
@ -1041,5 +1051,6 @@
|
||||||
private System.Windows.Forms.ToolStripSeparator Separator4;
|
private System.Windows.Forms.ToolStripSeparator Separator4;
|
||||||
private System.Windows.Forms.ToolStripMenuItem ReadBreakpointContextMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem ReadBreakpointContextMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem WriteBreakpointContextMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem WriteBreakpointContextMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1086,6 +1086,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
UnfreezeAllContextMenuItem.Visible = Global.CheatList.ActiveCount > 0;
|
UnfreezeAllContextMenuItem.Visible = Global.CheatList.ActiveCount > 0;
|
||||||
|
|
||||||
ViewInHexEditorContextMenuItem.Visible = SelectedWatches.Count() == 1;
|
ViewInHexEditorContextMenuItem.Visible = SelectedWatches.Count() == 1;
|
||||||
|
|
||||||
|
newToolStripMenuItem.Visible = indexes.Count == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UnfreezeAllContextMenuItem_Click(object sender, EventArgs e)
|
private void UnfreezeAllContextMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -1213,5 +1215,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
SelectedIndices.Any() &&
|
SelectedIndices.Any() &&
|
||||||
SelectedWatches.All(w => w.Domain.CanPoke());
|
SelectedWatches.All(w => w.Domain.CanPoke());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ using System.Drawing;
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
|
using BizHawk.Client.EmuHawk;
|
||||||
using BizHawk.Client.EmuHawk.FilterManager;
|
using BizHawk.Client.EmuHawk.FilterManager;
|
||||||
using BizHawk.Bizware.BizwareGL;
|
using BizHawk.Bizware.BizwareGL;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
using BizHawk.Common.BufferExtensions;
|
using BizHawk.Common.BufferExtensions;
|
||||||
|
using BizHawk.Client.EmuHawk;
|
||||||
using BizHawk.Bizware.BizwareGL;
|
using BizHawk.Bizware.BizwareGL;
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
|
|
|
@ -13,6 +13,7 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
using BizHawk.Common.IOExtensions;
|
using BizHawk.Common.IOExtensions;
|
||||||
|
using BizHawk.Client.EmuHawk;
|
||||||
using BizHawk.Bizware.BizwareGL;
|
using BizHawk.Bizware.BizwareGL;
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||||
|
@ -32,7 +33,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
public Mainform(string[] args)
|
public Mainform(string[] args)
|
||||||
{
|
{
|
||||||
BizHawk.Client.Common.GLManager.CreateInstance();
|
GLManager.CreateInstance();
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_throttle = new BizHawk.Client.EmuHawk.Throttle();
|
_throttle = new BizHawk.Client.EmuHawk.Throttle();
|
||||||
|
@ -319,7 +320,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
Emulator = loader.LoadedEmulator,
|
Emulator = loader.LoadedEmulator,
|
||||||
|
|
||||||
GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(),
|
GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(),
|
||||||
GLManager = BizHawk.Client.Common.GLManager.Instance,
|
GLManager = GLManager.Instance,
|
||||||
Game = loader.Game,
|
Game = loader.Game,
|
||||||
CurrentRomPath = loader.CanonicalFullPath
|
CurrentRomPath = loader.CanonicalFullPath
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
<Compile Include="Extensions\ReflectionExtensions.cs" />
|
<Compile Include="Extensions\ReflectionExtensions.cs" />
|
||||||
<Compile Include="Extensions\StringExtensions.cs" />
|
<Compile Include="Extensions\StringExtensions.cs" />
|
||||||
<Compile Include="HawkFile.cs" />
|
<Compile Include="HawkFile.cs" />
|
||||||
|
<Compile Include="InstanceDll.cs" />
|
||||||
<Compile Include="IPC\IPCRingBuffer.cs" />
|
<Compile Include="IPC\IPCRingBuffer.cs" />
|
||||||
<Compile Include="IPC\SharedMemoryBlock.cs" />
|
<Compile Include="IPC\SharedMemoryBlock.cs" />
|
||||||
<Compile Include="Log.cs" />
|
<Compile Include="Log.cs" />
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace BizHawk.Common.IOExtensions
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read bytes from a BinaryReader and translate them into the UTF-8 string they represent.
|
// Read bytes from a BinaryReader and translate them into the UTF-8 string they represent.
|
||||||
|
//WHAT? WHY IS THIS NAMED ASCII BUT USING UTF8
|
||||||
public static string ReadStringFixedAscii(this BinaryReader r, int bytes)
|
public static string ReadStringFixedAscii(this BinaryReader r, int bytes)
|
||||||
{
|
{
|
||||||
var read = new byte[bytes];
|
var read = new byte[bytes];
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace BizHawk.Common
|
||||||
|
{
|
||||||
|
public class InstanceDll : IDisposable
|
||||||
|
{
|
||||||
|
public InstanceDll(string dllPath)
|
||||||
|
{
|
||||||
|
//copy the dll to a temp directory
|
||||||
|
var path = Path.Combine(Path.GetTempPath(), "instancedll-pid" + System.Diagnostics.Process.GetCurrentProcess().Id + "-" + Guid.NewGuid()) + "-" + Path.GetFileName(dllPath);
|
||||||
|
using (var stream = new FileStream(path, FileMode.Create, System.Security.AccessControl.FileSystemRights.FullControl, FileShare.ReadWrite | FileShare.Delete, 4 * 1024, FileOptions.None))
|
||||||
|
using (var sdll = File.OpenRead(dllPath))
|
||||||
|
sdll.CopyTo(stream);
|
||||||
|
|
||||||
|
_hModule = LoadLibrary(path);
|
||||||
|
var newfname = Path.GetFileName(path);
|
||||||
|
newfname = "bizhawk.bizdelete-" + newfname;
|
||||||
|
var newpath = Path.Combine(Path.GetDirectoryName(path), newfname);
|
||||||
|
File.Move(path, newpath);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("kernel32.dll")]
|
||||||
|
static extern IntPtr LoadLibrary(string dllToLoad);
|
||||||
|
[DllImport("kernel32.dll")]
|
||||||
|
static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
|
||||||
|
[DllImport("kernel32.dll")]
|
||||||
|
static extern bool FreeLibrary(IntPtr hModule);
|
||||||
|
|
||||||
|
public IntPtr GetProcAddress(string procName)
|
||||||
|
{
|
||||||
|
return GetProcAddress(_hModule, procName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (_hModule != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
FreeLibrary(_hModule);
|
||||||
|
_hModule = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IntPtr _hModule;
|
||||||
|
}
|
||||||
|
}
|
|
@ -217,6 +217,11 @@ namespace BizHawk.Emulation.Common
|
||||||
private MemoryDomain _mainMemory;
|
private MemoryDomain _mainMemory;
|
||||||
private MemoryDomain _systemBus;
|
private MemoryDomain _systemBus;
|
||||||
|
|
||||||
|
public bool Has(string name)
|
||||||
|
{
|
||||||
|
return this.FirstOrDefault((md) => md.Name == name) != null;
|
||||||
|
}
|
||||||
|
|
||||||
public MemoryDomainList(IList<MemoryDomain> domains)
|
public MemoryDomainList(IList<MemoryDomain> domains)
|
||||||
: base(domains)
|
: base(domains)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
<Compile Include="Base Implementations\NullSound.cs" />
|
<Compile Include="Base Implementations\NullSound.cs" />
|
||||||
<Compile Include="Base Implementations\TraceBuffer.cs" />
|
<Compile Include="Base Implementations\TraceBuffer.cs" />
|
||||||
<Compile Include="BinaryQuickSerializer.cs" />
|
<Compile Include="BinaryQuickSerializer.cs" />
|
||||||
|
<Compile Include="CodeDataLog.cs" />
|
||||||
<Compile Include="CoreAttributes.cs" />
|
<Compile Include="CoreAttributes.cs" />
|
||||||
<Compile Include="CoreComms.cs" />
|
<Compile Include="CoreComms.cs" />
|
||||||
<Compile Include="Database\CRC32.cs" />
|
<Compile Include="Database\CRC32.cs" />
|
||||||
|
@ -73,6 +74,7 @@
|
||||||
<Compile Include="EmulationExceptions.cs" />
|
<Compile Include="EmulationExceptions.cs" />
|
||||||
<Compile Include="Enums.cs" />
|
<Compile Include="Enums.cs" />
|
||||||
<Compile Include="Extensions.cs" />
|
<Compile Include="Extensions.cs" />
|
||||||
|
<Compile Include="Interfaces\ICodeDataLogger.cs" />
|
||||||
<Compile Include="Interfaces\IController.cs" />
|
<Compile Include="Interfaces\IController.cs" />
|
||||||
<Compile Include="Interfaces\ICoreFileProvider.cs" />
|
<Compile Include="Interfaces\ICoreFileProvider.cs" />
|
||||||
<Compile Include="Interfaces\IDebuggable.cs" />
|
<Compile Include="Interfaces\IDebuggable.cs" />
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
|
namespace BizHawk.Emulation.Common
|
||||||
|
{
|
||||||
|
public class CodeDataLog : Dictionary<string, byte[]>
|
||||||
|
{
|
||||||
|
public CodeDataLog()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This is just a hook, if needed, to readily suspend logging, without having to rewire the core
|
||||||
|
/// </summary>
|
||||||
|
public bool Active = true;
|
||||||
|
|
||||||
|
public string SubType;
|
||||||
|
public int SubVer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tests whether the other CodeDataLog is structurally identical
|
||||||
|
/// </summary>
|
||||||
|
public bool Check(CodeDataLog other)
|
||||||
|
{
|
||||||
|
if (SubType != other.SubType)
|
||||||
|
return false;
|
||||||
|
if (SubVer != other.SubVer)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (this.Count != other.Count)
|
||||||
|
return false;
|
||||||
|
foreach (var kvp in this)
|
||||||
|
{
|
||||||
|
if (!other.ContainsKey(kvp.Key))
|
||||||
|
return false;
|
||||||
|
var oval = other[kvp.Key];
|
||||||
|
if (oval.Length != kvp.Value.Length)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LogicalOrFrom(CodeDataLog other)
|
||||||
|
{
|
||||||
|
if (this.Count != other.Count)
|
||||||
|
throw new InvalidDataException("Dictionaries must have the same number of keys!");
|
||||||
|
|
||||||
|
foreach (var kvp in other)
|
||||||
|
{
|
||||||
|
byte[] fromdata = kvp.Value;
|
||||||
|
byte[] todata = this[kvp.Key];
|
||||||
|
|
||||||
|
if (fromdata.Length != todata.Length)
|
||||||
|
throw new InvalidDataException("Memory regions must be the same size!");
|
||||||
|
|
||||||
|
for (int i = 0; i < todata.Length; i++)
|
||||||
|
todata[i] |= fromdata[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearData()
|
||||||
|
{
|
||||||
|
foreach (byte[] data in Values)
|
||||||
|
Array.Clear(data, 0, data.Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Save(Stream s)
|
||||||
|
{
|
||||||
|
_Save(s, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, long> _Save(Stream s, bool forReal)
|
||||||
|
{
|
||||||
|
var ret = new Dictionary<string, long>();
|
||||||
|
var w = new BinaryWriter(s);
|
||||||
|
w.Write("BIZHAWK-CDL-2");
|
||||||
|
w.Write(SubType.PadRight(15));
|
||||||
|
w.Write(Count);
|
||||||
|
w.Flush();
|
||||||
|
long addr = s.Position;
|
||||||
|
if (forReal)
|
||||||
|
{
|
||||||
|
foreach (var kvp in this)
|
||||||
|
{
|
||||||
|
w.Write(kvp.Key);
|
||||||
|
w.Write(kvp.Value.Length);
|
||||||
|
w.Write(kvp.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var kvp in this)
|
||||||
|
{
|
||||||
|
addr += kvp.Key.Length + 1; //assumes shortly-encoded key names
|
||||||
|
addr += 4;
|
||||||
|
ret[kvp.Key] = addr;
|
||||||
|
addr += kvp.Value.Length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
w.Flush();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, long> GetBlockMap()
|
||||||
|
{
|
||||||
|
return _Save(new MemoryStream(), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Load(Stream s)
|
||||||
|
{
|
||||||
|
var br = new BinaryReader(s);
|
||||||
|
string id = br.ReadString();
|
||||||
|
if (id == "BIZHAWK-CDL-1")
|
||||||
|
SubType = "PCE";
|
||||||
|
else if (id == "BIZHAWK-CDL-2")
|
||||||
|
SubType = br.ReadString().TrimEnd(' ');
|
||||||
|
else
|
||||||
|
throw new InvalidDataException("File is not a Bizhawk CDL file!");
|
||||||
|
|
||||||
|
int count = br.ReadInt32();
|
||||||
|
for (int i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
string key = br.ReadString();
|
||||||
|
int len = br.ReadInt32();
|
||||||
|
byte[] data = br.ReadBytes(len);
|
||||||
|
this[key] = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -78,6 +78,31 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
|
||||||
return (IInputPollable)core.ServiceProvider.GetService<IInputPollable>();
|
return (IInputPollable)core.ServiceProvider.GetService<IInputPollable>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool InputCallbacksAvailable(this IEmulator core)
|
||||||
|
{
|
||||||
|
if (core == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: this is a pretty ugly way to handle this
|
||||||
|
var pollable = (IInputPollable)core.ServiceProvider.GetService<IInputPollable>();
|
||||||
|
if (pollable != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var callbacks = pollable.InputCallbacks;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (NotImplementedException)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static bool HasDriveLight(this IEmulator core)
|
public static bool HasDriveLight(this IEmulator core)
|
||||||
{
|
{
|
||||||
if (core == null)
|
if (core == null)
|
||||||
|
@ -215,6 +240,21 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
|
||||||
return (IRegionable)core.ServiceProvider.GetService<IRegionable>();
|
return (IRegionable)core.ServiceProvider.GetService<IRegionable>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool CanCDLog(this IEmulator core)
|
||||||
|
{
|
||||||
|
if (core == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return core.ServiceProvider.HasService<ICodeDataLogger>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ICodeDataLogger AsCodeDataLogger(this IEmulator core)
|
||||||
|
{
|
||||||
|
return core.ServiceProvider.GetService<ICodeDataLogger>();
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: a better place for these
|
// TODO: a better place for these
|
||||||
public static bool IsImplemented(this MethodInfo info)
|
public static bool IsImplemented(this MethodInfo info)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace BizHawk.Emulation.Common
|
||||||
|
{
|
||||||
|
public interface ICodeDataLogger : IEmulatorService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the CodeDataLog as current (and logging) on the core
|
||||||
|
/// </summary>
|
||||||
|
void SetCDL(CodeDataLog cdl);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fills a new CodeDataLog with memory domain information suitable for the core
|
||||||
|
/// </summary>
|
||||||
|
void NewCDL(CodeDataLog cdl);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Disassembles the CodeDataLog to an output Stream. Can't be done without a core because there's no code to disassemble otherwise!
|
||||||
|
/// This could be extended later to produce richer multi-file disassembly
|
||||||
|
/// </summary>
|
||||||
|
void DisassembleCDL(Stream s, CodeDataLog cdl);
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,5 +18,7 @@ namespace BizHawk.Emulation.Common
|
||||||
bool HasSystemBus { get; }
|
bool HasSystemBus { get; }
|
||||||
|
|
||||||
MemoryDomain SystemBus { get; set; }
|
MemoryDomain SystemBus { get; set; }
|
||||||
|
|
||||||
|
bool Has(string name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,6 +347,9 @@
|
||||||
<Compile Include="Consoles\Intellivision\PSG.cs" />
|
<Compile Include="Consoles\Intellivision\PSG.cs" />
|
||||||
<Compile Include="Consoles\Intellivision\STIC.cs" />
|
<Compile Include="Consoles\Intellivision\STIC.cs" />
|
||||||
<Compile Include="Consoles\Nintendo\Gameboy\Gambatte.cs" />
|
<Compile Include="Consoles\Nintendo\Gameboy\Gambatte.cs" />
|
||||||
|
<Compile Include="Consoles\Nintendo\Gameboy\Gambatte.ICodeDataLog.cs">
|
||||||
|
<DependentUpon>Gambatte.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Consoles\Nintendo\Gameboy\Gambatte.IDebuggable.cs">
|
<Compile Include="Consoles\Nintendo\Gameboy\Gambatte.IDebuggable.cs">
|
||||||
<DependentUpon>Gambatte.cs</DependentUpon>
|
<DependentUpon>Gambatte.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -787,6 +790,7 @@
|
||||||
<Compile Include="Consoles\Sega\Saturn\Yabause.IStatable.cs">
|
<Compile Include="Consoles\Sega\Saturn\Yabause.IStatable.cs">
|
||||||
<DependentUpon>Yabause.cs</DependentUpon>
|
<DependentUpon>Yabause.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Consoles\Sega\SMS\CDL_SMS.cs" />
|
||||||
<Compile Include="Consoles\Sega\SMS\SMS.Input.cs" />
|
<Compile Include="Consoles\Sega\SMS\SMS.Input.cs" />
|
||||||
<Compile Include="Consoles\Sega\SMS\TerebiOekaki.cs" />
|
<Compile Include="Consoles\Sega\SMS\TerebiOekaki.cs" />
|
||||||
<Compile Include="Consoles\Sega\SMS\MemoryMap.Korea.cs" />
|
<Compile Include="Consoles\Sega\SMS\MemoryMap.Korea.cs" />
|
||||||
|
@ -824,6 +828,7 @@
|
||||||
<Compile Include="CoreInventory.cs" />
|
<Compile Include="CoreInventory.cs" />
|
||||||
<Compile Include="CPUs\CP1610\CP1610.Disassembler.cs" />
|
<Compile Include="CPUs\CP1610\CP1610.Disassembler.cs" />
|
||||||
<Compile Include="CPUs\CP1610\CP1610.Execute.cs" />
|
<Compile Include="CPUs\CP1610\CP1610.Execute.cs" />
|
||||||
|
<Compile Include="CPUs\HuC6280\HuC6280_CDL.cs" />
|
||||||
<Compile Include="CPUs\W65816\Disassembler.cs" />
|
<Compile Include="CPUs\W65816\Disassembler.cs" />
|
||||||
<Compile Include="CPUs\68000\Diassembler.cs" />
|
<Compile Include="CPUs\68000\Diassembler.cs" />
|
||||||
<Compile Include="CPUs\68000\Instructions\BitArithemetic.cs" />
|
<Compile Include="CPUs\68000\Instructions\BitArithemetic.cs" />
|
||||||
|
@ -837,7 +842,6 @@
|
||||||
<Compile Include="CPUs\68000\Tables.cs" />
|
<Compile Include="CPUs\68000\Tables.cs" />
|
||||||
<Compile Include="CPUs\ARM\Darm.cs" />
|
<Compile Include="CPUs\ARM\Darm.cs" />
|
||||||
<Compile Include="CPUs\CP1610\CP1610.cs" />
|
<Compile Include="CPUs\CP1610\CP1610.cs" />
|
||||||
<Compile Include="CPUs\HuC6280\CDL.cs" />
|
|
||||||
<Compile Include="CPUs\HuC6280\CDLOpcodes.cs" />
|
<Compile Include="CPUs\HuC6280\CDLOpcodes.cs" />
|
||||||
<Compile Include="CPUs\HuC6280\Disassembler.cs" />
|
<Compile Include="CPUs\HuC6280\Disassembler.cs" />
|
||||||
<Compile Include="CPUs\HuC6280\Execute.cs" />
|
<Compile Include="CPUs\HuC6280\Execute.cs" />
|
||||||
|
|
|
@ -1,288 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.Emulation.Cores.Components.H6280
|
|
||||||
{
|
|
||||||
public class CodeDataLog : Dictionary<string, byte[]>
|
|
||||||
{
|
|
||||||
private CodeDataLog()
|
|
||||||
:base()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LogicalOrFrom(CodeDataLog other)
|
|
||||||
{
|
|
||||||
if (this.Count != other.Count)
|
|
||||||
throw new InvalidDataException("Dictionaries must have the same number of keys!");
|
|
||||||
|
|
||||||
foreach (var kvp in other)
|
|
||||||
{
|
|
||||||
byte[] fromdata = kvp.Value;
|
|
||||||
byte[] todata = this[kvp.Key];
|
|
||||||
|
|
||||||
if (fromdata.Length != todata.Length)
|
|
||||||
throw new InvalidDataException("Memory regions must be the same size!");
|
|
||||||
|
|
||||||
for (int i = 0; i < todata.Length; i++)
|
|
||||||
todata[i] |= fromdata[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ClearData()
|
|
||||||
{
|
|
||||||
foreach (byte[] data in Values)
|
|
||||||
Array.Clear(data, 0, data.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Save(Stream s)
|
|
||||||
{
|
|
||||||
var w = new BinaryWriter(s);
|
|
||||||
w.Write("BIZHAWK-CDL-1");
|
|
||||||
w.Write(Count);
|
|
||||||
foreach (var kvp in this)
|
|
||||||
{
|
|
||||||
w.Write(kvp.Key);
|
|
||||||
w.Write(kvp.Value.Length);
|
|
||||||
w.Write(kvp.Value);
|
|
||||||
}
|
|
||||||
w.Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Disassemble(Stream s, IMemoryDomains mem)
|
|
||||||
{
|
|
||||||
var w = new StreamWriter(s);
|
|
||||||
w.WriteLine("; Bizhawk CDL Disassembly");
|
|
||||||
w.WriteLine();
|
|
||||||
foreach (var kvp in this)
|
|
||||||
{
|
|
||||||
w.WriteLine(".\"{0}\" size=0x{1:x8}", kvp.Key, kvp.Value.Length);
|
|
||||||
|
|
||||||
byte[] cd = kvp.Value;
|
|
||||||
var md = mem[kvp.Key];
|
|
||||||
|
|
||||||
for (int i = 0; i < kvp.Value.Length; i++)
|
|
||||||
{
|
|
||||||
if ((kvp.Value[i] & (byte)HuC6280.CDLUsage.Code) != 0)
|
|
||||||
{
|
|
||||||
int unused;
|
|
||||||
string dis = HuC6280.DisassembleExt(
|
|
||||||
0,
|
|
||||||
out unused,
|
|
||||||
delegate(ushort addr)
|
|
||||||
{
|
|
||||||
return md.PeekByte(addr + i);
|
|
||||||
},
|
|
||||||
delegate(ushort addr)
|
|
||||||
{
|
|
||||||
return md.PeekWord(addr + i, false);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
w.WriteLine("0x{0:x8}: {1}", i, dis);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
w.WriteLine();
|
|
||||||
}
|
|
||||||
w.WriteLine("; EOF");
|
|
||||||
w.Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static CodeDataLog Load(Stream s)
|
|
||||||
{
|
|
||||||
var t = new CodeDataLog();
|
|
||||||
var r = new BinaryReader(s);
|
|
||||||
string id = r.ReadString();
|
|
||||||
if (id != "BIZHAWK-CDL-1")
|
|
||||||
throw new InvalidDataException("File is not a Bizhawk CDL file!");
|
|
||||||
int count = r.ReadInt32();
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
string key = r.ReadString();
|
|
||||||
int len = r.ReadInt32();
|
|
||||||
byte[] data = r.ReadBytes(len);
|
|
||||||
t[key] = data;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CheckConsistency(IEnumerable<HuC6280.MemMapping> mm)
|
|
||||||
{
|
|
||||||
var sizes = SizesFromHuMap(mm);
|
|
||||||
if (sizes.Count != Count)
|
|
||||||
return false;
|
|
||||||
foreach (var kvp in sizes)
|
|
||||||
{
|
|
||||||
if (!ContainsKey(kvp.Key))
|
|
||||||
return false;
|
|
||||||
if (this[kvp.Key].Length != kvp.Value)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Dictionary<string, int> SizesFromHuMap(IEnumerable<HuC6280.MemMapping> mm)
|
|
||||||
{
|
|
||||||
Dictionary<string, int> sizes = new Dictionary<string, int>();
|
|
||||||
foreach (var m in mm)
|
|
||||||
{
|
|
||||||
if (!sizes.ContainsKey(m.Name) || m.MaxOffs >= sizes[m.Name])
|
|
||||||
sizes[m.Name] = m.MaxOffs;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> keys = new List<string>(sizes.Keys);
|
|
||||||
foreach (var key in keys)
|
|
||||||
{
|
|
||||||
// becase we were looking at offsets, and each bank is 8192 big, we need to add that size
|
|
||||||
sizes[key] += 8192;
|
|
||||||
}
|
|
||||||
return sizes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static CodeDataLog Create(IEnumerable<HuC6280.MemMapping> mm)
|
|
||||||
{
|
|
||||||
var t = new CodeDataLog();
|
|
||||||
foreach (var kvp in SizesFromHuMap(mm))
|
|
||||||
{
|
|
||||||
t[kvp.Key] = new byte[kvp.Value];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class HuC6280
|
|
||||||
{
|
|
||||||
public struct MemMapping
|
|
||||||
{
|
|
||||||
public string Name;
|
|
||||||
public int Offs;
|
|
||||||
public int VOffs; // if non-zero, specifies a larger potential offset
|
|
||||||
public int MaxOffs { get { return Math.Max(Offs, VOffs); } }
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemMapping[] Mappings; // = new MemMapping[256];
|
|
||||||
|
|
||||||
public CodeDataLog CDL = null;
|
|
||||||
|
|
||||||
public bool CDLLoggingActive = false;
|
|
||||||
|
|
||||||
[Flags]
|
|
||||||
public enum CDLUsage : byte
|
|
||||||
{
|
|
||||||
// was fetched as an opcode first byte
|
|
||||||
Code = 0x01,
|
|
||||||
// was read or written as data
|
|
||||||
Data = 0x02,
|
|
||||||
// was read and used as a pointer to data via indirect addressing
|
|
||||||
DataPtr = 0x04,
|
|
||||||
// was read or written as stack
|
|
||||||
Stack = 0x08,
|
|
||||||
// was read or written as data via indirect addressing
|
|
||||||
IndirectData = 0x10,
|
|
||||||
// was read and used as function pointer
|
|
||||||
// NB: there is no "IndirectCode"; all code is marked simply as code regardless of how it is reached
|
|
||||||
FcnPtr = 0x20,
|
|
||||||
// was used as a source or destination (either initial or during the loop) of a block xfer
|
|
||||||
BlockXFer = 0x40,
|
|
||||||
// was fetched as an operand byte to an opcode
|
|
||||||
CodeOperand = 0x80
|
|
||||||
}
|
|
||||||
|
|
||||||
void Mark(ushort addr, CDLUsage flag)
|
|
||||||
{
|
|
||||||
var m = Mappings[MPR[addr >> 13]];
|
|
||||||
CDL[m.Name][addr & 0x1fff | m.Offs] |= (byte)flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
// mark addr as having been fetched for execute
|
|
||||||
void MarkCode(int addr_, int n)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)(addr_ + i);
|
|
||||||
Mark(addr, i == 0 ? CDLUsage.Code : CDLUsage.CodeOperand);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// mark addr as having been seen as data
|
|
||||||
void MarkAddr(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)addr_;
|
|
||||||
Mark(addr, CDLUsage.Data);
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert address to zero-page, then mark as data
|
|
||||||
void MarkZP(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)(addr_ & 0xff | 0x2000);
|
|
||||||
Mark(addr, CDLUsage.Data);
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert address to zero-page, then return the pointer stored there
|
|
||||||
ushort GetIndirect(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)(addr_ & 0xff | 0x2000);
|
|
||||||
return ReadWordPageWrap(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert address to zero-page, then mark as pointer (two bytes)
|
|
||||||
void MarkZPPtr(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)(addr_ & 0xff | 0x2000);
|
|
||||||
ushort addr2 = (ushort)(addr & 0xff00 | (addr + 1) & 0x00ff);
|
|
||||||
Mark(addr, CDLUsage.DataPtr);
|
|
||||||
Mark(addr2, CDLUsage.DataPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
// mark address as destination data of an indirect pointer
|
|
||||||
void MarkIndirect(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)addr_;
|
|
||||||
Mark(addr, CDLUsage.IndirectData);
|
|
||||||
}
|
|
||||||
|
|
||||||
// mark stack space
|
|
||||||
void MarkPush(int n)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)(S - i);
|
|
||||||
Mark(addr, CDLUsage.Stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MarkPop(int n)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)(S + i + 1);
|
|
||||||
Mark(addr, CDLUsage.Stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// mark addr as function pointer (2 bytes)
|
|
||||||
void MarkFptr(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)addr_;
|
|
||||||
ushort addr2 = (ushort)(addr & 0xff00 | (addr + 1) & 0x00ff);
|
|
||||||
Mark(addr, CDLUsage.FcnPtr);
|
|
||||||
Mark(addr2, CDLUsage.FcnPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
// block transfer "from"
|
|
||||||
void MarkBTFrom(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)addr_;
|
|
||||||
Mark(addr, CDLUsage.BlockXFer);
|
|
||||||
}
|
|
||||||
|
|
||||||
// block transfer "to"
|
|
||||||
void MarkBTTo(int addr_)
|
|
||||||
{
|
|
||||||
ushort addr = (ushort)addr_;
|
|
||||||
Mark(addr, CDLUsage.BlockXFer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -61,7 +61,7 @@ namespace BizHawk.Emulation.Cores.Components.H6280
|
||||||
if (Debug) Logger(State());
|
if (Debug) Logger(State());
|
||||||
MemoryCallbacks.CallExecutes(PC);
|
MemoryCallbacks.CallExecutes(PC);
|
||||||
|
|
||||||
if (CDLLoggingActive) CDLOpcode();
|
if (CDL != null && CDL.Active) CDLOpcode();
|
||||||
|
|
||||||
byte opcode = ReadMemory(PC++);
|
byte opcode = ReadMemory(PC++);
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
|
|
|
@ -0,0 +1,200 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
|
namespace BizHawk.Emulation.Cores.Components.H6280
|
||||||
|
{
|
||||||
|
public partial class HuC6280
|
||||||
|
{
|
||||||
|
public void DisassembleCDL(Stream s, CodeDataLog cdl, IMemoryDomains mem)
|
||||||
|
{
|
||||||
|
var w = new StreamWriter(s);
|
||||||
|
w.WriteLine("; Bizhawk CDL Disassembly");
|
||||||
|
w.WriteLine();
|
||||||
|
foreach (var kvp in cdl)
|
||||||
|
{
|
||||||
|
w.WriteLine(".\"{0}\" size=0x{1:x8}", kvp.Key, kvp.Value.Length);
|
||||||
|
|
||||||
|
byte[] cd = kvp.Value;
|
||||||
|
var md = mem[kvp.Key];
|
||||||
|
|
||||||
|
for (int i = 0; i < kvp.Value.Length; i++)
|
||||||
|
{
|
||||||
|
if ((kvp.Value[i] & (byte)HuC6280.CDLUsage.Code) != 0)
|
||||||
|
{
|
||||||
|
int unused;
|
||||||
|
string dis = HuC6280.DisassembleExt(
|
||||||
|
0,
|
||||||
|
out unused,
|
||||||
|
delegate(ushort addr)
|
||||||
|
{
|
||||||
|
return md.PeekByte(addr + i);
|
||||||
|
},
|
||||||
|
delegate(ushort addr)
|
||||||
|
{
|
||||||
|
return md.PeekWord(addr + i, false);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
w.WriteLine("0x{0:x8}: {1}", i, dis);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
w.WriteLine();
|
||||||
|
}
|
||||||
|
w.WriteLine("; EOF");
|
||||||
|
w.Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, int> SizesFromHuMap(IEnumerable<HuC6280.MemMapping> mm)
|
||||||
|
{
|
||||||
|
Dictionary<string, int> sizes = new Dictionary<string, int>();
|
||||||
|
foreach (var m in mm)
|
||||||
|
{
|
||||||
|
if (!sizes.ContainsKey(m.Name) || m.MaxOffs >= sizes[m.Name])
|
||||||
|
sizes[m.Name] = m.MaxOffs;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> keys = new List<string>(sizes.Keys);
|
||||||
|
foreach (var key in keys)
|
||||||
|
{
|
||||||
|
// becase we were looking at offsets, and each bank is 8192 big, we need to add that size
|
||||||
|
sizes[key] += 8192;
|
||||||
|
}
|
||||||
|
return sizes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class HuC6280
|
||||||
|
{
|
||||||
|
public struct MemMapping
|
||||||
|
{
|
||||||
|
public string Name;
|
||||||
|
public int Offs;
|
||||||
|
public int VOffs; // if non-zero, specifies a larger potential offset
|
||||||
|
public int MaxOffs { get { return Math.Max(Offs, VOffs); } }
|
||||||
|
}
|
||||||
|
|
||||||
|
public MemMapping[] Mappings; // = new MemMapping[256];
|
||||||
|
|
||||||
|
public CodeDataLog CDL = null;
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum CDLUsage : byte
|
||||||
|
{
|
||||||
|
// was fetched as an opcode first byte
|
||||||
|
Code = 0x01,
|
||||||
|
// was read or written as data
|
||||||
|
Data = 0x02,
|
||||||
|
// was read and used as a pointer to data via indirect addressing
|
||||||
|
DataPtr = 0x04,
|
||||||
|
// was read or written as stack
|
||||||
|
Stack = 0x08,
|
||||||
|
// was read or written as data via indirect addressing
|
||||||
|
IndirectData = 0x10,
|
||||||
|
// was read and used as function pointer
|
||||||
|
// NB: there is no "IndirectCode"; all code is marked simply as code regardless of how it is reached
|
||||||
|
FcnPtr = 0x20,
|
||||||
|
// was used as a source or destination (either initial or during the loop) of a block xfer
|
||||||
|
BlockXFer = 0x40,
|
||||||
|
// was fetched as an operand byte to an opcode
|
||||||
|
CodeOperand = 0x80
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mark(ushort addr, CDLUsage flag)
|
||||||
|
{
|
||||||
|
var m = Mappings[MPR[addr >> 13]];
|
||||||
|
CDL[m.Name][addr & 0x1fff | m.Offs] |= (byte)flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark addr as having been fetched for execute
|
||||||
|
void MarkCode(int addr_, int n)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)(addr_ + i);
|
||||||
|
Mark(addr, i == 0 ? CDLUsage.Code : CDLUsage.CodeOperand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark addr as having been seen as data
|
||||||
|
void MarkAddr(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)addr_;
|
||||||
|
Mark(addr, CDLUsage.Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert address to zero-page, then mark as data
|
||||||
|
void MarkZP(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)(addr_ & 0xff | 0x2000);
|
||||||
|
Mark(addr, CDLUsage.Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert address to zero-page, then return the pointer stored there
|
||||||
|
ushort GetIndirect(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)(addr_ & 0xff | 0x2000);
|
||||||
|
return ReadWordPageWrap(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert address to zero-page, then mark as pointer (two bytes)
|
||||||
|
void MarkZPPtr(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)(addr_ & 0xff | 0x2000);
|
||||||
|
ushort addr2 = (ushort)(addr & 0xff00 | (addr + 1) & 0x00ff);
|
||||||
|
Mark(addr, CDLUsage.DataPtr);
|
||||||
|
Mark(addr2, CDLUsage.DataPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark address as destination data of an indirect pointer
|
||||||
|
void MarkIndirect(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)addr_;
|
||||||
|
Mark(addr, CDLUsage.IndirectData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark stack space
|
||||||
|
void MarkPush(int n)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)(S - i);
|
||||||
|
Mark(addr, CDLUsage.Stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarkPop(int n)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)(S + i + 1);
|
||||||
|
Mark(addr, CDLUsage.Stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark addr as function pointer (2 bytes)
|
||||||
|
void MarkFptr(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)addr_;
|
||||||
|
ushort addr2 = (ushort)(addr & 0xff00 | (addr + 1) & 0x00ff);
|
||||||
|
Mark(addr, CDLUsage.FcnPtr);
|
||||||
|
Mark(addr2, CDLUsage.FcnPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// block transfer "from"
|
||||||
|
void MarkBTFrom(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)addr_;
|
||||||
|
Mark(addr, CDLUsage.BlockXFer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// block transfer "to"
|
||||||
|
void MarkBTTo(int addr_)
|
||||||
|
{
|
||||||
|
ushort addr = (ushort)addr_;
|
||||||
|
Mark(addr, CDLUsage.BlockXFer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -35,6 +35,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80
|
||||||
|
|
||||||
// Memory Access
|
// Memory Access
|
||||||
|
|
||||||
|
public Func<ushort, bool, byte> FetchMemory;
|
||||||
public Func<ushort, byte> ReadMemory;
|
public Func<ushort, byte> ReadMemory;
|
||||||
public Action<ushort, byte> WriteMemory;
|
public Action<ushort, byte> WriteMemory;
|
||||||
|
|
||||||
|
@ -48,6 +49,26 @@ namespace BizHawk.Emulation.Cores.Components.Z80
|
||||||
return ReadMemory(addr);
|
return ReadMemory(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte FetchFirstMemoryWrapper(ushort addr)
|
||||||
|
{
|
||||||
|
if (MemoryCallbacks != null)
|
||||||
|
{
|
||||||
|
MemoryCallbacks.CallReads(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FetchMemory(addr, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte FetchMemoryWrapper(ushort addr)
|
||||||
|
{
|
||||||
|
if (MemoryCallbacks != null)
|
||||||
|
{
|
||||||
|
MemoryCallbacks.CallReads(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FetchMemory(addr, false);
|
||||||
|
}
|
||||||
|
|
||||||
public void WriteMemoryWrapper(ushort addr, byte value)
|
public void WriteMemoryWrapper(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
if (MemoryCallbacks != null)
|
if (MemoryCallbacks != null)
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
|
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
|
{
|
||||||
|
partial class Gameboy
|
||||||
|
{
|
||||||
|
void ICodeDataLogger.SetCDL(CodeDataLog cdl)
|
||||||
|
{
|
||||||
|
CDL = cdl;
|
||||||
|
if(cdl == null)
|
||||||
|
LibGambatte.gambatte_setcdcallback(GambatteState, null);
|
||||||
|
else
|
||||||
|
LibGambatte.gambatte_setcdcallback(GambatteState, CDCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ICodeDataLogger.NewCDL(CodeDataLog cdl)
|
||||||
|
{
|
||||||
|
cdl["ROM"] = new byte[MemoryDomains["ROM"].Size];
|
||||||
|
|
||||||
|
//cdl["HRAM"] = new byte[_memoryDomains["HRAM"].Size]; //this is probably useless, but it's here if someone needs it
|
||||||
|
cdl["WRAM"] = new byte[MemoryDomains["WRAM"].Size];
|
||||||
|
|
||||||
|
if (MemoryDomains.Has("CartRAM"))
|
||||||
|
cdl["CartRAM"] = new byte[MemoryDomains["WRAM"].Size];
|
||||||
|
|
||||||
|
cdl.SubType = "GB";
|
||||||
|
cdl.SubVer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//not supported
|
||||||
|
void ICodeDataLogger.DisassembleCDL(Stream s, CodeDataLog cdl) { }
|
||||||
|
|
||||||
|
CodeDataLog CDL;
|
||||||
|
LibGambatte.CDCallback CDCallback;
|
||||||
|
void CDCallbackProc(int addr, LibGambatte.CDLog_AddrType addrtype, LibGambatte.CDLog_Flags flags)
|
||||||
|
{
|
||||||
|
if (CDL == null) return;
|
||||||
|
if (!CDL.Active) return;
|
||||||
|
string key;
|
||||||
|
switch (addrtype)
|
||||||
|
{
|
||||||
|
case LibGambatte.CDLog_AddrType.ROM: key = "ROM"; break;
|
||||||
|
case LibGambatte.CDLog_AddrType.HRAM: key = "HRAM"; break;
|
||||||
|
case LibGambatte.CDLog_AddrType.WRAM: key = "WRAM"; break;
|
||||||
|
case LibGambatte.CDLog_AddrType.CartRAM: key = "CartRAM"; break;
|
||||||
|
default: throw new InvalidOperationException("Juniper lightbulb proxy");
|
||||||
|
}
|
||||||
|
CDL[key][addr] |= (byte)flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
CreateMemoryDomain(LibGambatte.MemoryAreas.wram, "WRAM");
|
CreateMemoryDomain(LibGambatte.MemoryAreas.wram, "WRAM");
|
||||||
CreateMemoryDomain(LibGambatte.MemoryAreas.rom, "ROM");
|
CreateMemoryDomain(LibGambatte.MemoryAreas.rom, "ROM");
|
||||||
CreateMemoryDomain(LibGambatte.MemoryAreas.vram, "VRAM");
|
CreateMemoryDomain(LibGambatte.MemoryAreas.vram, "VRAM");
|
||||||
CreateMemoryDomain(LibGambatte.MemoryAreas.cartram, "Cart RAM");
|
CreateMemoryDomain(LibGambatte.MemoryAreas.cartram, "CartRAM");
|
||||||
CreateMemoryDomain(LibGambatte.MemoryAreas.oam, "OAM");
|
CreateMemoryDomain(LibGambatte.MemoryAreas.oam, "OAM");
|
||||||
CreateMemoryDomain(LibGambatte.MemoryAreas.hram, "HRAM");
|
CreateMemoryDomain(LibGambatte.MemoryAreas.hram, "HRAM");
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
portedUrl: "http://gambatte.sourceforge.net/"
|
portedUrl: "http://gambatte.sourceforge.net/"
|
||||||
)]
|
)]
|
||||||
[ServiceNotApplicable(typeof(IDriveLight), typeof(IDriveLight))]
|
[ServiceNotApplicable(typeof(IDriveLight), typeof(IDriveLight))]
|
||||||
public partial class Gameboy : IEmulator, IVideoProvider, ISyncSoundProvider, ISaveRam, IStatable, IInputPollable,
|
public partial class Gameboy : IEmulator, IVideoProvider, ISyncSoundProvider, ISaveRam, IStatable, IInputPollable, ICodeDataLogger,
|
||||||
IDebuggable, ISettable<Gameboy.GambatteSettings, Gameboy.GambatteSyncSettings>
|
IDebuggable, ISettable<Gameboy.GambatteSettings, Gameboy.GambatteSyncSettings>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -173,6 +173,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
TimeCallback = new LibGambatte.RTCCallback(GetCurrentTime);
|
TimeCallback = new LibGambatte.RTCCallback(GetCurrentTime);
|
||||||
LibGambatte.gambatte_setrtccallback(GambatteState, TimeCallback);
|
LibGambatte.gambatte_setrtccallback(GambatteState, TimeCallback);
|
||||||
|
|
||||||
|
CDCallback = new LibGambatte.CDCallback(CDCallbackProc);
|
||||||
|
|
||||||
NewSaveCoreSetBuff();
|
NewSaveCoreSetBuff();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -182,6 +184,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IEmulatorServiceProvider ServiceProvider { get; private set; }
|
public IEmulatorServiceProvider ServiceProvider { get; private set; }
|
||||||
|
|
||||||
#region ALL SAVESTATEABLE STATE GOES HERE
|
#region ALL SAVESTATEABLE STATE GOES HERE
|
||||||
|
|
|
@ -34,6 +34,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
MULTICART_COMPAT = 4
|
MULTICART_COMPAT = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum CDLog_AddrType : int
|
||||||
|
{
|
||||||
|
ROM, HRAM, WRAM, CartRAM
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum CDLog_Flags : int
|
||||||
|
{
|
||||||
|
ExecFirst = 1,
|
||||||
|
ExecOperand = 2,
|
||||||
|
Data = 4
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load ROM image.
|
/// Load ROM image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -161,6 +174,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void MemoryCallback(uint address);
|
public delegate void MemoryCallback(uint address);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// type of the CDLogger callback
|
||||||
|
/// </summary>
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
public delegate void CDCallback(int addr, CDLog_AddrType addrtype, CDLog_Flags flags);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// set a callback to occur immediately BEFORE EVERY cpu read, except for opcode first byte fetches
|
/// set a callback to occur immediately BEFORE EVERY cpu read, except for opcode first byte fetches
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -185,6 +204,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void gambatte_setexeccallback(IntPtr core, MemoryCallback callback);
|
public static extern void gambatte_setexeccallback(IntPtr core, MemoryCallback callback);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// set a callback whicih enables CD Logger feedback
|
||||||
|
/// </summary>
|
||||||
|
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void gambatte_setcdcallback(IntPtr core, CDCallback callback);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// type of the cpu trace callback
|
/// type of the cpu trace callback
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -28,13 +28,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
|
|
||||||
//speedups to deploy later:
|
//speedups to deploy later:
|
||||||
//todo - convey rom data faster than pipe blob (use shared memory) (WARNING: right now our general purpose shared memory is only 1MB. maybe wait until ring buffer IPC)
|
//todo - convey rom data faster than pipe blob (use shared memory) (WARNING: right now our general purpose shared memory is only 1MB. maybe wait until ring buffer IPC)
|
||||||
//todo - collapse input messages to one IPC operation. right now theresl ike 30 of them
|
//todo - collapse input messages to one IPC operation. right now theres like 30 of them
|
||||||
//todo - collect all memory block names whenever a memory block is alloc/dealloced. that way we avoid the overhead when using them for gui stuff (gfx debugger, hex editor)
|
//todo - collect all memory block names whenever a memory block is alloc/dealloced. that way we avoid the overhead when using them for gui stuff (gfx debugger, hex editor)
|
||||||
|
|
||||||
|
|
||||||
|
InstanceDll instanceDll;
|
||||||
string InstanceName;
|
string InstanceName;
|
||||||
Process process;
|
|
||||||
System.Threading.EventWaitHandle watchdogEvent;
|
|
||||||
NamedPipeServerStream pipe;
|
NamedPipeServerStream pipe;
|
||||||
BinaryWriter bwPipe;
|
BinaryWriter bwPipe;
|
||||||
BinaryReader brPipe;
|
BinaryReader brPipe;
|
||||||
|
@ -49,46 +48,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
[DllImport("msvcrt.dll", EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]
|
[DllImport("msvcrt.dll", EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]
|
||||||
public static unsafe extern void* CopyMemory(void* dest, void* src, ulong count);
|
public static unsafe extern void* CopyMemory(void* dest, void* src, ulong count);
|
||||||
|
|
||||||
static bool DryRun(string exePath)
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
delegate void DllInit(string ipcname);
|
||||||
|
|
||||||
|
public LibsnesApi(string dllPath)
|
||||||
{
|
{
|
||||||
ProcessStartInfo oInfo = new ProcessStartInfo(exePath, "Bongizong");
|
|
||||||
oInfo.WorkingDirectory = Path.GetDirectoryName(exePath);
|
|
||||||
oInfo.UseShellExecute = false;
|
|
||||||
oInfo.CreateNoWindow = true;
|
|
||||||
oInfo.RedirectStandardOutput = true;
|
|
||||||
oInfo.RedirectStandardError = true;
|
|
||||||
|
|
||||||
Process proc = System.Diagnostics.Process.Start(oInfo);
|
|
||||||
string result = proc.StandardError.ReadToEnd();
|
|
||||||
proc.WaitForExit();
|
|
||||||
|
|
||||||
//yongou chonganong nongo tong rongeadong
|
|
||||||
//pongigong chong hongi nonge songe
|
|
||||||
if (result == "Honga Wongkong" && proc.ExitCode == 0x16817)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HashSet<string> okExes = new HashSet<string>();
|
|
||||||
public LibsnesApi(string exePath)
|
|
||||||
{
|
|
||||||
//make sure we've checked this exe for OKness.. the dry run should keep us from freezing up or crashing weirdly if the external process isnt correct
|
|
||||||
if (!okExes.Contains(exePath))
|
|
||||||
{
|
|
||||||
bool ok = DryRun(exePath);
|
|
||||||
if (!ok)
|
|
||||||
throw new InvalidOperationException(string.Format("Couldn't launch {0} to run SNES core. Not sure why this would have happened. Try redownloading BizHawk first.", Path.GetFileName(exePath)));
|
|
||||||
okExes.Add(exePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
InstanceName = "libsneshawk_" + Guid.NewGuid().ToString();
|
InstanceName = "libsneshawk_" + Guid.NewGuid().ToString();
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
//use this to get a debug console with libsnes output
|
|
||||||
InstanceName = "console-" + InstanceName;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
var pipeName = InstanceName;
|
var pipeName = InstanceName;
|
||||||
|
|
||||||
mmf = MemoryMappedFile.CreateNew(pipeName, 1024 * 1024);
|
mmf = MemoryMappedFile.CreateNew(pipeName, 1024 * 1024);
|
||||||
|
@ -97,19 +63,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
|
|
||||||
pipe = new NamedPipeServerStream(pipeName, PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.None, 1024 * 1024, 1024);
|
pipe = new NamedPipeServerStream(pipeName, PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.None, 1024 * 1024, 1024);
|
||||||
|
|
||||||
//slim chance this might be useful sometimes:
|
instanceDll = new InstanceDll(dllPath);
|
||||||
//http://stackoverflow.com/questions/2590334/creating-a-cross-process-eventwaithandle
|
var dllinit = (DllInit)Marshal.GetDelegateForFunctionPointer(instanceDll.GetProcAddress("DllInit"), typeof(DllInit));
|
||||||
//create an event for the child process to monitor with a watchdog, to make sure it terminates when the emuhawk process terminates.
|
dllinit(pipeName);
|
||||||
//NOTE: this is alarming! for some reason .net releases this event when it gets finalized, instead of when i (dont) dispose it.
|
|
||||||
bool createdNew;
|
|
||||||
watchdogEvent = new System.Threading.EventWaitHandle(false, System.Threading.EventResetMode.AutoReset, InstanceName + "-event", out createdNew);
|
|
||||||
|
|
||||||
process = new Process();
|
|
||||||
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(exePath);
|
|
||||||
process.StartInfo.FileName = exePath;
|
|
||||||
process.StartInfo.Arguments = pipeName;
|
|
||||||
process.StartInfo.ErrorDialog = true;
|
|
||||||
process.Start();
|
|
||||||
|
|
||||||
//TODO - start a thread to wait for process to exit and gracefully handle errors? how about the pipe?
|
//TODO - start a thread to wait for process to exit and gracefully handle errors? how about the pipe?
|
||||||
|
|
||||||
|
@ -142,10 +98,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
watchdogEvent.Dispose();
|
WritePipeMessage(eMessage.eMessage_Shutdown);
|
||||||
process.Kill();
|
WaitForCompletion();
|
||||||
process.Dispose();
|
instanceDll.Dispose();
|
||||||
process = null;
|
|
||||||
pipe.Dispose();
|
pipe.Dispose();
|
||||||
mmva.Dispose();
|
mmva.Dispose();
|
||||||
mmf.Dispose();
|
mmf.Dispose();
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
eMessage_BeginBufferIO,
|
eMessage_BeginBufferIO,
|
||||||
eMessage_EndBufferIO,
|
eMessage_EndBufferIO,
|
||||||
eMessage_ResumeAfterBRK,
|
eMessage_ResumeAfterBRK,
|
||||||
|
eMessage_Shutdown,
|
||||||
|
|
||||||
eMessage_QUERY_library_id,
|
eMessage_QUERY_library_id,
|
||||||
eMessage_QUERY_library_revision_major,
|
eMessage_QUERY_library_revision_major,
|
||||||
|
|
|
@ -57,7 +57,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
this.SyncSettings = (SnesSyncSettings)SyncSettings ?? new SnesSyncSettings();
|
this.SyncSettings = (SnesSyncSettings)SyncSettings ?? new SnesSyncSettings();
|
||||||
|
|
||||||
api = new LibsnesApi(GetExePath());
|
api = new LibsnesApi(GetExePath());
|
||||||
api.CMD_init();
|
|
||||||
api.ReadHook = ReadHook;
|
api.ReadHook = ReadHook;
|
||||||
api.ExecHook = ExecHook;
|
api.ExecHook = ExecHook;
|
||||||
api.WriteHook = WriteHook;
|
api.WriteHook = WriteHook;
|
||||||
|
@ -384,7 +383,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
// if (Win32.Is64BitOperatingSystem)
|
// if (Win32.Is64BitOperatingSystem)
|
||||||
// bits = "64";
|
// bits = "64";
|
||||||
|
|
||||||
var exename = "libsneshawk-" + bits + "-" + CurrentProfile.ToLower() + ".exe";
|
var exename = "libsneshawk-" + bits + "-" + CurrentProfile.ToLower() + ".dll";
|
||||||
|
|
||||||
string exePath = Path.Combine(CoreComm.CoreFileProvider.DllPath(), exename);
|
string exePath = Path.Combine(CoreComm.CoreFileProvider.DllPath(), exename);
|
||||||
|
|
||||||
|
@ -679,7 +678,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
//video provider
|
//video provider
|
||||||
int IVideoProvider.BackgroundColor { get { return 0; } }
|
int IVideoProvider.BackgroundColor { get { return 0; } }
|
||||||
int[] IVideoProvider.GetVideoBuffer() { return vidBuffer; }
|
int[] IVideoProvider.GetVideoBuffer() { return vidBuffer; }
|
||||||
int IVideoProvider.VirtualWidth { get { return vidWidth; } }
|
int IVideoProvider.VirtualWidth { get { return (int)(vidWidth * 1.146); } }
|
||||||
public int VirtualHeight { get { return vidHeight; } }
|
public int VirtualHeight { get { return vidHeight; } }
|
||||||
int IVideoProvider.BufferWidth { get { return vidWidth; } }
|
int IVideoProvider.BufferWidth { get { return vidWidth; } }
|
||||||
int IVideoProvider.BufferHeight { get { return vidHeight; } }
|
int IVideoProvider.BufferHeight { get { return vidHeight; } }
|
||||||
|
|
|
@ -663,7 +663,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
{
|
{
|
||||||
int mapIndex = mty * dims.Width + mtx;
|
int mapIndex = mty * dims.Width + mtx;
|
||||||
var te = map[mapIndex];
|
var te = map[mapIndex];
|
||||||
int tileNum = te.tilenum + tx + ty * 16 + baseTileNum;
|
|
||||||
|
//apply metatile flipping
|
||||||
|
int tnx = tx, tny = ty;
|
||||||
|
if (tilesize == 16)
|
||||||
|
{
|
||||||
|
if ((te.flags & TileEntryFlags.Horz) != 0) tnx = 1 - tnx;
|
||||||
|
if ((te.flags & TileEntryFlags.Vert) != 0) tny = 1 - tny;
|
||||||
|
}
|
||||||
|
|
||||||
|
int tileNum = te.tilenum + tnx + tny * 16 + baseTileNum;
|
||||||
int srcOfs = tileNum * 64;
|
int srcOfs = tileNum * 64;
|
||||||
for (int i = 0, y = 0; y < 8; y++)
|
for (int i = 0, y = 0; y < 8; y++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
|
||||||
private int[] _vbuff = new int[512 * 480];
|
private int[] _vbuff = new int[512 * 480];
|
||||||
public int[] GetVideoBuffer() { return _vbuff; }
|
public int[] GetVideoBuffer() { return _vbuff; }
|
||||||
public int VirtualWidth
|
public int VirtualWidth
|
||||||
{ get { return BufferWidth; } }
|
{ get { return (int)(BufferWidth * 1.146); ; } }
|
||||||
public int VirtualHeight { get { return BufferHeight; } }
|
public int VirtualHeight { get { return BufferHeight; } }
|
||||||
public int BufferWidth { get { return 256; } }
|
public int BufferWidth { get { return 256; } }
|
||||||
public int BufferHeight { get { return 224; } }
|
public int BufferHeight { get { return 224; } }
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
====Type definitions==============
|
|
||||||
|
|
||||||
A "string" is an LEB128 encoded number which is the number of bytes
|
|
||||||
in the string, followed by that many bytes of UTF-8 character data.
|
|
||||||
|
|
||||||
A "number" is a little endian 32 bit integer.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
====File format is as follows:====
|
|
||||||
|
|
||||||
string id: file identifier, always "BIZHAWK-CDL-1"
|
|
||||||
number NumberOfBlocks: number of memory areas represented in this file
|
|
||||||
|
|
||||||
For each block:
|
|
||||||
|
|
||||||
string BlockName: identifying name of the block.
|
|
||||||
number bytelength: length of the block in bytes.
|
|
||||||
byte data[bytelength]: one byte of information for each byte in the original block.
|
|
||||||
|
|
||||||
|
|
||||||
====Other definitions:============
|
|
||||||
|
|
||||||
The BlockNames are:
|
|
||||||
|
|
||||||
ROM
|
|
||||||
HUCard ROM, or syscard bios ROm
|
|
||||||
|
|
||||||
Cart Battery RAM
|
|
||||||
32K of battery backed ram in the Populous cart
|
|
||||||
|
|
||||||
Super System Card RAM
|
|
||||||
192K of ram in the super system card
|
|
||||||
|
|
||||||
TurboCD RAM
|
|
||||||
64K of ram in the turboCD
|
|
||||||
|
|
||||||
BRAM
|
|
||||||
8K of TurboCD backup RAM. The actual RAM is smaller, but the CDL will record all
|
|
||||||
activity in that 8K region.
|
|
||||||
|
|
||||||
Main Memory
|
|
||||||
8K or 32K (SGX) of main memory
|
|
||||||
|
|
||||||
MMIO
|
|
||||||
8K of space in block ff, containing system IO ports.
|
|
||||||
|
|
||||||
UNKNOWN
|
|
||||||
8K long area which any unknown block maps to.
|
|
||||||
|
|
||||||
|
|
||||||
Each byte has 8 bits of flags on what the byte has been observed to do:
|
|
||||||
|
|
||||||
// was fetched as an opcode
|
|
||||||
Code = 0x01,
|
|
||||||
// was read or written as data
|
|
||||||
Data = 0x02,
|
|
||||||
// was read and used as a pointer to data via indirect addressing
|
|
||||||
DataPtr = 0x04,
|
|
||||||
// was read or written as stack
|
|
||||||
Stack = 0x08,
|
|
||||||
// was read or written as data via indirect addressing
|
|
||||||
IndirectData = 0x10,
|
|
||||||
// was read and used as function pointer
|
|
||||||
// NB: there is no "IndirectCode"; all code is marked simply as code regardless of how it is reached
|
|
||||||
FcnPtr = 0x20,
|
|
||||||
// was used as a source or destination (either initial or during the loop) of a block xfer
|
|
||||||
BlockXFer = 0x40,
|
|
||||||
// was fetched as an operand byte to an opcode
|
|
||||||
CodeOperand = 0x80
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
||||||
isReleased: true
|
isReleased: true
|
||||||
)]
|
)]
|
||||||
public sealed partial class PCEngine : IEmulator, ISaveRam, IStatable, IInputPollable,
|
public sealed partial class PCEngine : IEmulator, ISaveRam, IStatable, IInputPollable,
|
||||||
IDebuggable, ISettable<PCEngine.PCESettings, PCEngine.PCESyncSettings>, IDriveLight
|
IDebuggable, ISettable<PCEngine.PCESettings, PCEngine.PCESyncSettings>, IDriveLight, ICodeDataLogger
|
||||||
{
|
{
|
||||||
// ROM
|
// ROM
|
||||||
public byte[] RomData;
|
public byte[] RomData;
|
||||||
|
@ -315,6 +315,47 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
||||||
private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
||||||
public IInputCallbackSystem InputCallbacks { get { return _inputCallbacks; } }
|
public IInputCallbackSystem InputCallbacks { get { return _inputCallbacks; } }
|
||||||
|
|
||||||
|
void ICodeDataLogger.SetCDL(CodeDataLog cdl)
|
||||||
|
{
|
||||||
|
Cpu.CDL = cdl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ICodeDataLogger.NewCDL(CodeDataLog cdl)
|
||||||
|
{
|
||||||
|
InitCDLMappings();
|
||||||
|
var mm = this.Cpu.Mappings;
|
||||||
|
foreach (var kvp in SizesFromHuMap(mm))
|
||||||
|
{
|
||||||
|
cdl[kvp.Key] = new byte[kvp.Value];
|
||||||
|
}
|
||||||
|
|
||||||
|
cdl.SubType = "PCE";
|
||||||
|
cdl.SubVer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ICodeDataLogger.DisassembleCDL(Stream s, CodeDataLog cdl)
|
||||||
|
{
|
||||||
|
Cpu.DisassembleCDL(s, cdl, memoryDomains);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, int> SizesFromHuMap(IEnumerable<HuC6280.MemMapping> mm)
|
||||||
|
{
|
||||||
|
Dictionary<string, int> sizes = new Dictionary<string, int>();
|
||||||
|
foreach (var m in mm)
|
||||||
|
{
|
||||||
|
if (!sizes.ContainsKey(m.Name) || m.MaxOffs >= sizes[m.Name])
|
||||||
|
sizes[m.Name] = m.MaxOffs;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> keys = new List<string>(sizes.Keys);
|
||||||
|
foreach (var key in keys)
|
||||||
|
{
|
||||||
|
// becase we were looking at offsets, and each bank is 8192 big, we need to add that size
|
||||||
|
sizes[key] += 8192;
|
||||||
|
}
|
||||||
|
return sizes;
|
||||||
|
}
|
||||||
|
|
||||||
public void ResetCounters()
|
public void ResetCounters()
|
||||||
{
|
{
|
||||||
// this should just be a public setter instead of a new method.
|
// this should just be a public setter instead of a new method.
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue