From 303e9df26e5685f9abb51c5d88120544141f9643 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 4 Jan 2019 17:41:59 -0500 Subject: [PATCH 1/8] rejigger PlatformLinkedLibSingleton so it can be used embedded in the EXE without requiring a dependency on dlls, so it can boot when dlls are relocated --- .../BizHawk.Client.EmuHawk.csproj | 7 +++++-- BizHawk.Client.EmuHawk/Program.cs | 12 ++++++------ BizHawk.Common/PlatformLinkedLibSingleton.cs | 17 ++++++++++++----- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 2587f62945..0a3bf56323 100644 --- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -45,7 +45,7 @@ true ..\output\ - WINDOWS;DEBUG + DEBUG;WINDOWS;EXE_PROJECT true full AnyCPU @@ -56,7 +56,7 @@ ..\output\ - WINDOWS + WINDOWS;EXE_PROJECT true true pdbonly @@ -113,6 +113,9 @@ + + PlatformLinkedLibSingleton.cs + svnrev.cs diff --git a/BizHawk.Client.EmuHawk/Program.cs b/BizHawk.Client.EmuHawk/Program.cs index cc970daf55..0ed765e047 100644 --- a/BizHawk.Client.EmuHawk/Program.cs +++ b/BizHawk.Client.EmuHawk/Program.cs @@ -23,14 +23,14 @@ namespace BizHawk.Client.EmuHawk Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - var libLoader = PlatformLinkedLibSingleton.LinkedLibManager; + var libLoader = EXE_PROJECT.PlatformLinkedLibSingleton.LinkedLibManager; //http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips //try loading libraries we know we'll need //something in the winforms, etc. code below will cause .net to popup a missing msvcr100.dll in case that one's missing //but oddly it lets us proceed and we'll then catch it here - var libExt = PlatformLinkedLibSingleton.RunningOnUnix ? ".dll.so" : ".dll"; + var libExt = EXE_PROJECT.PlatformLinkedLibSingleton.RunningOnUnix ? ".dll.so" : ".dll"; var d3dx9 = libLoader.LoadPlatformSpecific($"d3dx9_43{libExt}"); var vc2015 = libLoader.LoadPlatformSpecific($"vcruntime140{libExt}"); var vc2012 = libLoader.LoadPlatformSpecific($"msvcr120{libExt}"); //TODO - check version? @@ -65,7 +65,7 @@ namespace BizHawk.Client.EmuHawk libLoader.FreePlatformSpecific(vc2010); libLoader.FreePlatformSpecific(vc2010p); - if (!PlatformLinkedLibSingleton.RunningOnUnix) + if (!EXE_PROJECT.PlatformLinkedLibSingleton.RunningOnUnix) { // this will look in subdirectory "dll" to load pinvoked stuff string dllDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll"); @@ -200,7 +200,7 @@ namespace BizHawk.Client.EmuHawk } } } - private static PlatformSpecificMainLoopCrashHandler mainLoopCrashHandler = PlatformLinkedLibSingleton.RunningOnUnix + private static PlatformSpecificMainLoopCrashHandler mainLoopCrashHandler = EXE_PROJECT.PlatformLinkedLibSingleton.RunningOnUnix ? (PlatformSpecificMainLoopCrashHandler) new UnixMonoMainLoopCrashHandler() : (PlatformSpecificMainLoopCrashHandler) new Win32MainLoopCrashHandler(); @@ -265,7 +265,7 @@ namespace BizHawk.Client.EmuHawk GlobalWin.GLManager = GLManager.Instance; //now create the "GL" context for the display method. we can reuse the IGL_TK context if opengl display method is chosen - if (PlatformLinkedLibSingleton.RunningOnUnix) Global.Config.DispMethod = Config.EDispMethod.GdiPlus; + if (EXE_PROJECT.PlatformLinkedLibSingleton.RunningOnUnix) Global.Config.DispMethod = Config.EDispMethod.GdiPlus; REDO_DISPMETHOD: if (Global.Config.DispMethod == Config.EDispMethod.GdiPlus) GlobalWin.GL = new Bizware.BizwareGL.Drivers.GdiPlus.IGL_GdiPlus(); @@ -313,7 +313,7 @@ namespace BizHawk.Client.EmuHawk goto REDO_DISPMETHOD; } - if (!PlatformLinkedLibSingleton.RunningOnUnix) + if (!EXE_PROJECT.PlatformLinkedLibSingleton.RunningOnUnix) { //WHY do we have to do this? some intel graphics drivers (ig7icd64.dll 10.18.10.3304 on an unknown chip on win8.1) are calling SetDllDirectory() for the process, which ruins stuff. //The relevant initialization happened just before in "create IGL context". diff --git a/BizHawk.Common/PlatformLinkedLibSingleton.cs b/BizHawk.Common/PlatformLinkedLibSingleton.cs index 9a9ed2baab..14ed9c29e6 100644 --- a/BizHawk.Common/PlatformLinkedLibSingleton.cs +++ b/BizHawk.Common/PlatformLinkedLibSingleton.cs @@ -1,9 +1,16 @@ using System; -using System.Runtime.InteropServices; - +using System.Runtime.InteropServices; + +//put in a different namespace for EXE so we can have an instance of this type (by linking to this file rather than copying it) built-in to the exe +//so the exe doesnt implicitly depend on the dll +#if EXE_PROJECT +namespace EXE_PROJECT +#else namespace BizHawk.Common -{ - public sealed class PlatformLinkedLibSingleton +#endif +{ + +public sealed class PlatformLinkedLibSingleton { public static readonly bool RunningOnUnix = Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX; @@ -83,4 +90,4 @@ namespace BizHawk.Common } } } -} \ No newline at end of file +} From b9094545db80e464150347bdf135cc07c1d9b38e Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Fri, 4 Jan 2019 18:03:34 -0600 Subject: [PATCH 2/8] update 7zip file location --- BizHawk.Client.Common/7z/LibraryManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/7z/LibraryManager.cs b/BizHawk.Client.Common/7z/LibraryManager.cs index 8f0d8c4b68..ac0aedd2ee 100644 --- a/BizHawk.Client.Common/7z/LibraryManager.cs +++ b/BizHawk.Client.Common/7z/LibraryManager.cs @@ -63,7 +63,7 @@ namespace SevenZip /// 7z.dll (from the 7-zip distribution) supports every InArchiveFormat for encoding and decoding. /// //private static string _libraryFileName = ConfigurationManager.AppSettings["7zLocation"] ?? Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "7z.dll"); - private static string _libraryFileName = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "7z.dll"); + private static string _libraryFileName = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "dll\\7z.dll"); #endif #if WINCE From e2ccff1c821f93371bc9666b15c7b02b0d00f355 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sat, 5 Jan 2019 08:23:16 -0600 Subject: [PATCH 3/8] GBHawk: CGB double speed linking --- .../Consoles/Nintendo/GBHawk/SerialPort.cs | 28 +++++++++++++++++-- .../GBHawkLink/GBHawkLink.IEmulator.cs | 8 +++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs index 4aa700268c..f5e0150c61 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs @@ -49,7 +49,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk if ((value & 1) > 0) { clk_internal = true; - clk_rate = 512; + if (((value & 2) > 0) && Core.GBC_compat) + { + clk_rate = 256; + } + else + { + clk_rate = 512; + } serial_clock = clk_rate; } else @@ -64,7 +71,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk if ((value & 1) > 0) { clk_internal = true; - clk_rate = 512; + if (((value & 2) > 0) && Core.GBC_compat) + { + clk_rate = 256; + } + else + { + clk_rate = 512; + } serial_clock = clk_rate; } else @@ -75,7 +89,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk } } - serial_control = (byte)(0x7E | (value & 0x81)); // middle six bits always 1 + if (Core.GBC_compat) + { + serial_control = (byte)(0x7C | (value & 0x83)); // extra CGB bit + } + else + { + serial_control = (byte)(0x7E | (value & 0x81)); // middle six bits always 1 + } + break; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs index 0a95188026..48ce21972b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs @@ -105,7 +105,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink R.do_single_step(); // the signal to shift out a bit is when serial_clock = 1 - if (L.serialport.serial_clock == 1) + if ((L.serialport.serial_clock == 1) || (L.serialport.serial_clock == 2)) { if (LinkConnected) { @@ -113,7 +113,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink if ((R.serialport.clk_rate == -1) && R.serialport.serial_start) { - R.serialport.serial_clock = 1; + R.serialport.serial_clock = L.serialport.serial_clock; R.serialport.send_external_bit((byte)(R.serialport.serial_data & 0x80)); R.serialport.coming_in = L.serialport.going_out; } @@ -121,7 +121,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink L.serialport.coming_in = R.serialport.going_out; } } - else if (R.serialport.serial_clock == 1) + else if ((R.serialport.serial_clock == 1) || (R.serialport.serial_clock == 2)) { if (LinkConnected) { @@ -129,7 +129,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink if ((L.serialport.clk_rate == -1) && L.serialport.serial_start) { - L.serialport.serial_clock = 1; + L.serialport.serial_clock = R.serialport.serial_clock; L.serialport.send_external_bit((byte)(L.serialport.serial_data & 0x80)); L.serialport.coming_in = R.serialport.going_out; } From 292ee296dc116cca0f0c403a4d72fd106141a209 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sat, 5 Jan 2019 10:34:19 -0600 Subject: [PATCH 4/8] GBHAwk: palette not writable during rendering: fixes lego racers --- .../Consoles/Nintendo/GBHawk/GBC_PPU.cs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs index b02084f64b..27775f026b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs @@ -82,7 +82,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk case 0xFF54: ret = HDMA_dest_lo; break; // HDMA4 case 0xFF55: ret = HDMA_ctrl; break; // HDMA5 case 0xFF68: ret = BG_pal_ret; break; // BGPI - case 0xFF69: ret = BG_bytes[BG_bytes_index]; break; // BGPD + case 0xFF69: ret = BG_PAL_read(); break; // BGPD case 0xFF6A: ret = OBJ_pal_ret; break; // OBPI case 0xFF6B: ret = OBJ_bytes[OBJ_bytes_index]; break; // OBPD } @@ -90,6 +90,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk return ret; } + public byte BG_PAL_read() + { + if (VRAM_access_read) + { + return BG_bytes[BG_bytes_index]; + } + else + { + return 0xFF; + } + } + public override void WriteReg(int addr, byte value) { switch (addr) @@ -240,8 +252,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk BG_bytes_inc = ((value & 0x80) == 0x80); break; case 0xFF69: // BGPD - BG_transfer_byte = value; - BG_bytes[BG_bytes_index] = value; + if (VRAM_access_write) + { + BG_transfer_byte = value; + BG_bytes[BG_bytes_index] = value; + } // change the appropriate palette color color_compute_BG(); From cd2d63b04a0844cecef1d1d4a273ecc1422ef654 Mon Sep 17 00:00:00 2001 From: feos Date: Sat, 5 Jan 2019 21:30:06 +0300 Subject: [PATCH 5/8] tastudio: - don't use branch laglog after loading it. it's useless because we invalidate if needed anyway - PauseOnFrame being null started to crash seeking, fixed - make use of movie alias in branchbox - capture tsm state after loading the branch todo: if we load a branch in the middle of invalid greenzone, advancing won't draw new greenzone even tho states are being created. laglog doesn't seem to allow gaps either. unsure how to resolve --- .../movie/tasproj/TasMovie.cs | 8 ++------ BizHawk.Client.EmuHawk/MainForm.cs | 2 +- .../tools/TAStudio/BookmarksBranchesBox.cs | 19 ++++++++++--------- .../tools/TAStudio/TAStudio.cs | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index e500a1e833..80b54f7c9a 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -509,17 +509,13 @@ namespace BizHawk.Client.Common Log?.Dispose(); Log = branch.InputLog.Clone(); - _lagLog.FromLagLog(branch.LagLog); - - // 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 if (divergentPoint.HasValue) { - _stateManager.Invalidate(divergentPoint.Value); + InvalidateAfter(divergentPoint.Value); } else { - _stateManager.Invalidate(branch.InputLog.Count); + InvalidateAfter(branch.InputLog.Count); } if (BindMarkersToInput) // pretty critical not to erase them diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 4c02e8bf16..28f0311d31 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3060,11 +3060,11 @@ namespace BizHawk.Client.EmuHawk if (IsSeeking && Emulator.Frame == PauseOnFrame.Value) { PauseEmulator(); - PauseOnFrame = null; if (GlobalWin.Tools.IsLoaded()) { GlobalWin.Tools.TAStudio.StopSeeking(); } + PauseOnFrame = null; } } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 8e7adcc47b..f64cace517 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -117,7 +117,7 @@ namespace BizHawk.Client.EmuHawk TasBranch branch = GetBranch(index); if (branch != null) { - var record = Tastudio.CurrentTasMovie[branch.Frame]; + var record = Movie[branch.Frame]; if (index == Movie.CurrentBranch) { color = TAStudio.CurrentFrame_InputLog; @@ -146,7 +146,7 @@ namespace BizHawk.Client.EmuHawk private TasBranch GetBranch(int index) { - return Tastudio.CurrentTasMovie.GetBranch(index); + return Movie.GetBranch(index); } public void Branch() @@ -199,13 +199,14 @@ namespace BizHawk.Client.EmuHawk return; } - Tastudio.CurrentTasMovie.LoadBranch(branch); + Movie.LoadBranch(branch); var stateInfo = new KeyValuePair(branch.Frame, branch.CoreData); Tastudio.LoadState(stateInfo); + Movie.TasStateManager.Capture(true); QuickBmpFile.Copy(new BitmapBufferVideoProvider(branch.OSDFrameBuffer), Tastudio.VideoProvider); if (Tastudio.Settings.OldControlSchemeForBranches && Tastudio.TasPlaybackBox.RecordingMode) - Tastudio.CurrentTasMovie.Truncate(branch.Frame); + Movie.Truncate(branch.Frame); GlobalWin.MainForm.PauseOnFrame = null; Tastudio.RefreshDialog(); @@ -242,7 +243,7 @@ namespace BizHawk.Client.EmuHawk private void AddBranchToolStripMenuItem_Click(object sender, EventArgs e) { Branch(); - CallSavedCallback(Tastudio.CurrentTasMovie.BranchCount - 1); + CallSavedCallback(Movie.BranchCount - 1); GlobalWin.OSD.AddMessage("Added branch " + Movie.CurrentBranch.ToString()); } @@ -250,7 +251,7 @@ namespace BizHawk.Client.EmuHawk { Branch(); EditBranchTextPopUp(Movie.CurrentBranch); - CallSavedCallback(Tastudio.CurrentTasMovie.BranchCount - 1); + CallSavedCallback(Movie.BranchCount - 1); GlobalWin.OSD.AddMessage("Added branch " + Movie.CurrentBranch.ToString()); } @@ -366,13 +367,13 @@ namespace BizHawk.Client.EmuHawk if (_branchUndo == BranchUndo.Load) { LoadBranch(_backupBranch); - CallLoadedCallback(Tastudio.CurrentTasMovie.Branches.IndexOf(_backupBranch)); + CallLoadedCallback(Movie.Branches.IndexOf(_backupBranch)); GlobalWin.OSD.AddMessage("Branch Load canceled"); } else if (_branchUndo == BranchUndo.Update) { Movie.UpdateBranch(Movie.GetBranch(_backupBranch.UniqueIdentifier), _backupBranch); - CallSavedCallback(Tastudio.CurrentTasMovie.Branches.IndexOf(_backupBranch)); + CallSavedCallback(Movie.Branches.IndexOf(_backupBranch)); GlobalWin.OSD.AddMessage("Branch Update canceled"); } else if (_branchUndo == BranchUndo.Text) @@ -384,7 +385,7 @@ namespace BizHawk.Client.EmuHawk { Movie.AddBranch(_backupBranch); BranchView.RowCount = Movie.BranchCount; - CallSavedCallback(Tastudio.CurrentTasMovie.Branches.IndexOf(_backupBranch)); + CallSavedCallback(Movie.Branches.IndexOf(_backupBranch)); GlobalWin.OSD.AddMessage("Branch Removal canceled"); } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 0019b8e3eb..8b0647d1f6 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -191,7 +191,7 @@ namespace BizHawk.Client.EmuHawk this.Invoke(() => SavingProgressBar.Visible = true); for (;;) { - if (_seekBackgroundWorker.CancellationPending || !this.IsHandleCreated) + if (_seekBackgroundWorker.CancellationPending || !IsHandleCreated || !Mainform.PauseOnFrame.HasValue) { e.Cancel = true; break; From 56e77f490723d1b6bc08de0accbd8dba21108924 Mon Sep 17 00:00:00 2001 From: feos Date: Sat, 5 Jan 2019 21:48:40 +0300 Subject: [PATCH 6/8] tastudio: allow to actually unbind markers from input, and unbind by default --- BizHawk.Client.Common/movie/tasproj/TasMovie.cs | 4 ++-- BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index 80b54f7c9a..a226d2d17f 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -65,7 +65,7 @@ namespace BizHawk.Client.Common Markers = new TasMovieMarkerList(this); Markers.CollectionChanged += Markers_CollectionChanged; Markers.Add(0, startsFromSavestate ? "Savestate" : "Power on"); - BindMarkersToInput = true; + BindMarkersToInput = false; CurrentBranch = -1; } @@ -84,7 +84,7 @@ namespace BizHawk.Client.Common Markers = new TasMovieMarkerList(this); Markers.CollectionChanged += Markers_CollectionChanged; Markers.Add(0, startsFromSavestate ? "Savestate" : "Power on"); - BindMarkersToInput = true; + BindMarkersToInput = false; CurrentBranch = -1; } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 013f04ea77..f2eb9db437 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -822,6 +822,7 @@ namespace BizHawk.Client.EmuHawk SingleClickFloatEditMenuItem.Checked = Settings.SingleClickFloatEdit; OldControlSchemeForBranchesMenuItem.Checked = Settings.OldControlSchemeForBranches; LoadBranchOnDoubleclickMenuItem.Checked = Settings.LoadBranchOnDoubleClick; + BindMarkersToInputMenuItem.Checked = CurrentTasMovie.BindMarkersToInput; } private void SetMaxUndoLevelsMenuItem_Click(object sender, EventArgs e) From 3a8ae031d33763f6ba445a2e56841845c60cb0b9 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sat, 5 Jan 2019 13:00:37 -0600 Subject: [PATCH 7/8] GBHawkLink: Fix state error. --- .../Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs | 5 ----- .../Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs index 48ce21972b..1cebe9f5b4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs @@ -14,11 +14,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink public ControllerDefinition ControllerDefinition => _controllerDeck.Definition; - public byte controller_state; - public bool in_vblank_old; - public bool in_vblank; - public bool vblank_rise; - public void FrameAdvance(IController controller, bool render, bool rendersound) { //Console.WriteLine("-----------------------FRAME-----------------------"); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs index ffd05ea99f..5429566225 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs @@ -60,6 +60,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink ser.Sync("_cableconnected", ref _cableconnected); ser.Sync("_cablediscosignal", ref _cablediscosignal); _controllerDeck.SyncState(ser); + + LinkConnected = _cableconnected; } } } From b962f06e07cc5ab968816c72dd20e3a526e56722 Mon Sep 17 00:00:00 2001 From: Dan B Date: Sun, 6 Jan 2019 12:16:28 -0500 Subject: [PATCH 8/8] Fix quicknes --- .../Consoles/Nintendo/QuickNES/QuickNES.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index fc632d8fa9..899ae0254f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -21,7 +21,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES { static QuickNES() { - QN = BizInvoker.GetInvoker(new DynamicLibraryImportResolver(LibQuickNES.dllname), CallingConventionAdapters.Native); + Resolver = new DynamicLibraryImportResolver(LibQuickNES.dllname); + QN = BizInvoker.GetInvoker(Resolver, CallingConventionAdapters.Native); QN.qn_setup_mappers(); } @@ -73,6 +74,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES } static readonly LibQuickNES QN; + static readonly DynamicLibraryImportResolver Resolver; public IEmulatorServiceProvider ServiceProvider { get; private set; }