diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index d02c18bb80..ecaf0cd5eb 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -149,6 +149,7 @@ namespace BizHawk.MultiClient { {"Atari 2600 Basic Controller", new Dictionary() {{"Reset", "r"}, {"Select", "s"}}}, {"Gameboy Controller", new Dictionary() {{"Power", "P"}}}, + {"GBA Controller", new Dictionary() {{"Power", "P"}}}, {"Genesis 3-Button Controller", new Dictionary() {{"Reset", "r"}}}, {"NES Controller", new Dictionary() {{"Reset", "r"}, {"Power", "P"}, {"FDS Eject", "E"}, {"FDS Insert 0", "0"}, {"FDS Insert 1", "1"}, {"VS Coin 1", "c"}, {"VS Coin 2", "C"}}}, {"SNES Controller", new Dictionary() {{"Power", "P"}, {"Reset", "r"}}}, diff --git a/BizHawk.MultiClient/MainForm.Movie.cs b/BizHawk.MultiClient/MainForm.Movie.cs index 5d95417fe0..db98538a62 100644 --- a/BizHawk.MultiClient/MainForm.Movie.cs +++ b/BizHawk.MultiClient/MainForm.Movie.cs @@ -85,6 +85,17 @@ namespace BizHawk.MultiClient public void RecordMovie() { + // put any BEETA quality cores here + if (Global.Emulator is Emulation.Consoles.Nintendo.GBA.GBA) + { + var result = MessageBox.Show + (this, "Thanks for using Bizhawk! The emulation core you have selected " + + "is currently BETA-status. We appreciate your help in testing Bizhawk. " + + "You can record a movie on this core if you'd like to, but expect to " + + "encounter bugs and sync problems. Continue?", "BizHawk", MessageBoxButtons.YesNo); + if (result != System.Windows.Forms.DialogResult.Yes) + return; + } RecordMovie r = new RecordMovie(); r.ShowDialog(); } diff --git a/BizHawk.MultiClient/movie/InputAdapters.cs b/BizHawk.MultiClient/movie/InputAdapters.cs index 982e62a5df..6cd237bc80 100644 --- a/BizHawk.MultiClient/movie/InputAdapters.cs +++ b/BizHawk.MultiClient/movie/InputAdapters.cs @@ -370,8 +370,15 @@ namespace BizHawk.MultiClient private string GetGBAControllersAsMnemonic() { StringBuilder input = new StringBuilder("|"); - // there's no power button for now - input.Append(".|"); + if (IsBasePressed("Power")) + { + input.Append(Global.COMMANDS[ControlType]["Power"]); + } + else + { + input.Append("."); + } + input.Append("|"); foreach (string button in Global.BUTTONS[ControlType].Keys) { input.Append(IsBasePressed(button) ? Global.BUTTONS[ControlType][button] : "."); @@ -715,6 +722,26 @@ namespace BizHawk.MultiClient } //Redundancy beats crazy if logic that makes new consoles annoying to add + + private void SetGBAControllersAsMnemonic(string mnemonic) + { + MnemonicChecker c = new MnemonicChecker(mnemonic); + MyBoolButtons.Clear(); + if (mnemonic.Length < 2) + { + return; + } + if (mnemonic[1] == 'P') + { + Force("Power", true); + } + int start = 3; + foreach (string button in Global.BUTTONS[ControlType].Keys) + { + Force(button, c[start++]); + } + } + private void SetSNESControllersAsMnemonic(string mnemonic) { MnemonicChecker c = new MnemonicChecker(mnemonic); @@ -800,6 +827,11 @@ namespace BizHawk.MultiClient SetC64ControllersAsMnemonic(mnemonic); return; } + else if (ControlType == "GBA Controller") + { + SetGBAControllersAsMnemonic(mnemonic); + return; + } MnemonicChecker c = new MnemonicChecker(mnemonic); diff --git a/BizHawk.MultiClient/output/dll/libmeteor.dll b/BizHawk.MultiClient/output/dll/libmeteor.dll index adb24f1a77..18b0624d24 100644 Binary files a/BizHawk.MultiClient/output/dll/libmeteor.dll and b/BizHawk.MultiClient/output/dll/libmeteor.dll differ diff --git a/libmeteor/include/ameteor/memory.hpp b/libmeteor/include/ameteor/memory.hpp index d55cb7ff27..4c2607dc2a 100644 --- a/libmeteor/include/ameteor/memory.hpp +++ b/libmeteor/include/ameteor/memory.hpp @@ -97,11 +97,7 @@ namespace AMeteor return m_cart; } - void DeleteCart() - { - if (m_cart) - delete m_cart; - } + void DeleteCart(); bool HasBios () const { diff --git a/libmeteor/source/memory.cpp b/libmeteor/source/memory.cpp index 6fb2b01c84..4ba55bdee5 100644 --- a/libmeteor/source/memory.cpp +++ b/libmeteor/source/memory.cpp @@ -96,12 +96,21 @@ namespace AMeteor } } + void Memory::DeleteCart() + { + if (m_cart) + delete m_cart; + m_cart = NULL; + print_bizhawk("Cart Memory unloaded.\n"); + } + void Memory::SetCartType (uint8_t type) { if (m_cart) { delete m_cart; print_bizhawk("Cart Memory unloaded.\n"); + m_cart = NULL; } switch (type) {