diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 42288cf9f1..b83d1cfa39 100644 --- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -162,12 +162,8 @@ - - - - diff --git a/BizHawk.Client.EmuHawk/DisplayManager/SwappableBitmapBufferSet.cs b/BizHawk.Client.EmuHawk/DisplayManager/SwappableBitmapBufferSet.cs deleted file mode 100644 index f2e466f6db..0000000000 --- a/BizHawk.Client.EmuHawk/DisplayManager/SwappableBitmapBufferSet.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using BizHawk.Bizware.BizwareGL; - - -namespace BizHawk.Client.EmuHawk -{ - /// - /// encapsulates thread-safe concept of pending/current BitmapBuffer, reusing buffers where matching - /// sizes are available and keeping them cleaned up when they dont seem like theyll need to be used anymore - /// This isnt in the csproj right now, but I'm keeping it, in case its handy. - /// - class SwappableBitmapBufferSet - { - BitmapBuffer Pending, Current; - Queue ReleasedSurfaces = new Queue(); - - /// - /// retrieves a surface with the specified size, reusing an old buffer if available and clearing if requested - /// - public BitmapBuffer AllocateSurface(int width, int height, bool needsClear = true) - { - for (; ; ) - { - BitmapBuffer trial; - lock (this) - { - if (ReleasedSurfaces.Count == 0) break; - trial = ReleasedSurfaces.Dequeue(); - } - if (trial.Width == width && trial.Height == height) - { - if (needsClear) trial.ClearWithoutAlloc(); - return trial; - } - trial.Dispose(); - } - return new BitmapBuffer(width, height); - } - - /// - /// sets the provided buffer as pending. takes control of the supplied buffer - /// - public void SetPending(BitmapBuffer newPending) - { - lock (this) - { - if (Pending != null) ReleasedSurfaces.Enqueue(Pending); - Pending = newPending; - } - } - - public void ReleaseSurface(BitmapBuffer surface) - { - lock (this) ReleasedSurfaces.Enqueue(surface); - } - - /// - /// returns the current buffer, making the most recent pending buffer (if there is such) as the new current first. - /// - public BitmapBuffer GetCurrent() - { - lock (this) - { - if (Pending != null) - { - if (Current != null) ReleasedSurfaces.Enqueue(Current); - Current = Pending; - Pending = null; - } - } - return Current; - } - } - -} \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/ExternalCoreSupport.cs b/BizHawk.Client.EmuHawk/ExternalCoreSupport.cs deleted file mode 100644 index 3177ebb2bd..0000000000 --- a/BizHawk.Client.EmuHawk/ExternalCoreSupport.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Linq; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Collections.Generic; - -using BizHawk; - -namespace BizHawk.Client.EmuHawk -{ - - /// - /// accesses a shared library using LoadLibrary and GetProcAddress - /// - public class Win32LibAccessor : ILibAccessor - { - public Win32LibAccessor(string dllPath) - { - mDllHandle = LoadLibrary(dllPath); - if (mDllHandle == IntPtr.Zero) return; - IsOpen = true; - } - - public bool IsOpen { get; private set; } - - IntPtr mDllHandle; - - IntPtr ILibAccessor.GetProcAddress(string name) - { - if (!IsOpen) throw new InvalidOperationException("dll was not opened, you can't get a symbol from it"); - IntPtr ret = GetProcAddress(mDllHandle, name); - if (ret == IntPtr.Zero) throw new InvalidOperationException("symbol name was not found in dll!"); - return ret; - } - - public void Dispose() - { - if (mDllHandle == IntPtr.Zero) - FreeLibrary(mDllHandle); - mDllHandle = IntPtr.Zero; - IsOpen = false; - } - - ~Win32LibAccessor() - { - Dispose(); - } - - [DllImport("kernel32.dll")] - public static extern IntPtr LoadLibrary(string dllToLoad); - - [DllImport("kernel32.dll")] - public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName); - - [DllImport("kernel32.dll")] - public static extern bool FreeLibrary(IntPtr hModule); - } - -} \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/Global.cs b/BizHawk.Client.EmuHawk/Global.cs deleted file mode 100644 index ad2d44fa78..0000000000 --- a/BizHawk.Client.EmuHawk/Global.cs +++ /dev/null @@ -1,145 +0,0 @@ -using BizHawk.Emulation.Common; -using BizHawk.Emulation.Cores.Nintendo.Gameboy; -using BizHawk.Emulation.Cores.Sega.MasterSystem; -using BizHawk.Emulation.DiscSystem; - -namespace BizHawk.Client.Common -{ - public static class Global - { - public static IEmulator Emulator; - public static CoreComm CoreComm; - public static Config Config; - public static GameInfo Game; - public static CheatCollection CheatList; - public static FirmwareManager FirmwareManager; - public static Rewinder Rewinder; - - public static MovieSession MovieSession = new MovieSession(); - - /// - /// whether throttling is force-disabled by use of fast forward - /// - public static bool ForceNoThrottle; - - public static Controller NullControls; - public static AutofireController AutofireNullControls; - - //the movie will be spliced inbetween these if it is present - public static CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter(); - public static CopyControllerAdapter MovieOutputHardpoint = new CopyControllerAdapter(); - public static MultitrackRewiringControllerAdapter MultitrackRewiringAdapter = new MultitrackRewiringControllerAdapter(); - - //dont take my word for it, since the final word is actually in RewireInputChain, but here is a guide... - //user -> Input -> ActiveController -> UDLR -> StickyXORPlayerInputAdapter -> TurboAdapter(TBD) -> Lua(?TBD?) -> .. - //.. -> MultitrackRewiringControllerAdapter -> MovieInputSourceAdapter -> (MovieSession) -> MovieOutputAdapter -> ControllerOutput(1) -> Game - //(1)->Input Display - - //the original source controller, bound to the user, sort of the "input" port for the chain, i think - public static Controller ActiveController; - - //rapid fire version on the user controller, has its own key bindings and is OR'ed against ActiveController - public static AutofireController AutoFireController; - - //the "output" port for the controller chain. - public static CopyControllerAdapter ControllerOutput = new CopyControllerAdapter(); - - public static DiscHopper DiscHopper = new DiscHopper(); - - public static UD_LR_ControllerAdapter UD_LR_ControllerAdapter = new UD_LR_ControllerAdapter(); - - public static AutoFireStickyXorAdapter AutofireStickyXORAdapter = new AutoFireStickyXorAdapter(); - - /// - /// provides an opportunity to mutate the player's input in an autohold style - /// - public static StickyXorAdapter StickyXORAdapter = new StickyXorAdapter(); - - /// - /// Used to AND to another controller, used for Joypad.Set() - /// - public static OverrideAdaptor LuaAndAdaptor = new OverrideAdaptor(); - - /// - /// fire off one-frame logical button clicks here. useful for things like ti-83 virtual pad and reset buttons - /// - public static ClickyVirtualPadController ClickyVirtualPadController = new ClickyVirtualPadController(); - - public static SimpleController MovieOutputController = new SimpleController(); - - public static Controller ClientControls; - - // Input state which has been estine for game controller inputs are coalesce here - // This relies on a client specific implementation! - public static SimpleController ControllerInputCoalescer; - - public static SystemInfo SystemInfo - { - get - { - switch(Global.Emulator.SystemId) - { - default: - case "NULL": - return SystemInfo.Null; - case "NES": - return SystemInfo.Nes; - case "INTV": - return SystemInfo.Intellivision; - case "SG": - return SystemInfo.SG; - case "SMS": - if ((Global.Emulator as SMS).IsGameGear) - { - return SystemInfo.GG; - } - else if ((Global.Emulator as SMS).IsSG1000) - { - return SystemInfo.SG; - } - - return SystemInfo.SMS; - case "PCECD": - return SystemInfo.PCECD; - case "PCE": - return SystemInfo.PCE; - case "SGX": - return SystemInfo.SGX; - case "GEN": - return SystemInfo.Genesis; - case "TI83": - return SystemInfo.TI83; - case "SNES": - return SystemInfo.SNES; - case "GB": - if ((Global.Emulator as Gameboy).IsCGBMode()) - { - return SystemInfo.GBC; - } - - return SystemInfo.GB; - case "A26": - return SystemInfo.Atari2600; - case "A78": - return SystemInfo.Atari7800; - case "C64": - return SystemInfo.C64; - case "Coleco": - return SystemInfo.Coleco; - case "GBA": - return SystemInfo.GBA; - case "N64": - return SystemInfo.N64; - case "SAT": - return SystemInfo.Saturn; - case "DGB": - return SystemInfo.DualGB; - case "WSWAN": - return SystemInfo.WonderSwan; - case "LYNX": - return SystemInfo.Lynx; - } - } - } - } -} diff --git a/BizHawk.Client.EmuHawk/MainForm.resources b/BizHawk.Client.EmuHawk/MainForm.resources deleted file mode 100644 index 06c24d06c1..0000000000 Binary files a/BizHawk.Client.EmuHawk/MainForm.resources and /dev/null differ diff --git a/BizHawk.Client.EmuHawk/NameStateForm.resources b/BizHawk.Client.EmuHawk/NameStateForm.resources deleted file mode 100644 index 06c24d06c1..0000000000 Binary files a/BizHawk.Client.EmuHawk/NameStateForm.resources and /dev/null differ diff --git a/BizHawk.Client.EmuHawk/ProjectPkgRefs.props b/BizHawk.Client.EmuHawk/ProjectPkgRefs.props deleted file mode 100644 index e9c4773384..0000000000 --- a/BizHawk.Client.EmuHawk/ProjectPkgRefs.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/BizHawk.Client.EmuHawk/Watch.cs b/BizHawk.Client.EmuHawk/Watch.cs deleted file mode 100644 index 789632b08e..0000000000 --- a/BizHawk.Client.EmuHawk/Watch.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace BizHawk.Client.EmuHawk -{ - //Data structure for a watch item in the RAM Watch Dialog - public enum atype { BYTE, WORD, DWORD, SEPARATOR }; //TODO: more custom types too like 12.4 and 24.12 fixed point - public enum asigned { SIGNED, UNSIGNED, HEX }; - public class Watch - { - public Watch() - { - address = 0; - value = 0; - type = atype.BYTE; - signed = asigned.UNSIGNED; - bigendian = true; - notes = ""; - } - public Watch(int Address, int Value, atype Type, asigned Signed, bool BigEndian, string Notes) - { - address = Address; - value = Value; - type = Type; - signed = Signed; - bigendian = BigEndian; - notes = Notes; - } - public int address { get; set; } - public int value { get; set; } //Current value - public atype type { get; set; } //Address type (byte, word, dword, etc - public asigned signed { get; set; } //Signed/Unsigned? - public bool bigendian { get; set; } - public string notes { get; set; } //User notes - - public bool SetTypeByChar(char c) //b = byte, w = word, d = dword - { - switch (c) - { - case 'b': - type = atype.BYTE; - return true; - case 'w': - type = atype.WORD; - return true; - case 'd': - type = atype.DWORD; - return true; - case 'S': - type = atype.SEPARATOR; - return true; - default: - return false; - } - } - - public char GetTypeByChar() - { - switch (type) - { - case atype.BYTE: - return 'b'; - case atype.WORD: - return 'w'; - case atype.DWORD: - return 'd'; - case atype.SEPARATOR: - return 'S'; - default: - return 'b'; //Just in case - } - } - - public bool SetSignedByChar(char c) //s = signed, u = unsigned, h = hex - { - switch (c) - { - case 's': - signed = asigned.SIGNED; - return true; - case 'u': - signed = asigned.UNSIGNED; - return true; - case 'h': - signed = asigned.HEX; - return true; - default: - return false; - } - } - - public char GetSignedByChar() - { - switch (signed) - { - case asigned.SIGNED: - return 's'; - case asigned.UNSIGNED: - return 'u'; - case asigned.HEX: - return 'h'; - default: - return 's'; //Just in case - } - } - } -} diff --git a/BizHawk.Client.EmuHawk/packages.config b/BizHawk.Client.EmuHawk/packages.config deleted file mode 100644 index 2da82b8bc3..0000000000 --- a/BizHawk.Client.EmuHawk/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file