gba: fix cartmem problem i caused that was exposed by recording movies.
inputadapters: finish GBA mnemonic stuff, including power button. |P|UDLRsSBALR| mainform: show informative warning when starting recording a GBA movie
This commit is contained in:
parent
366370301f
commit
fec546f77a
|
@ -149,6 +149,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
{"Atari 2600 Basic Controller", new Dictionary<string, string>() {{"Reset", "r"}, {"Select", "s"}}},
|
{"Atari 2600 Basic Controller", new Dictionary<string, string>() {{"Reset", "r"}, {"Select", "s"}}},
|
||||||
{"Gameboy Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
{"Gameboy Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
||||||
|
{"GBA Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
||||||
{"Genesis 3-Button Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
{"Genesis 3-Button Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
||||||
{"NES Controller", new Dictionary<string, string>() {{"Reset", "r"}, {"Power", "P"}, {"FDS Eject", "E"}, {"FDS Insert 0", "0"}, {"FDS Insert 1", "1"}, {"VS Coin 1", "c"}, {"VS Coin 2", "C"}}},
|
{"NES Controller", new Dictionary<string, string>() {{"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<string, string>() {{"Power", "P"}, {"Reset", "r"}}},
|
{"SNES Controller", new Dictionary<string, string>() {{"Power", "P"}, {"Reset", "r"}}},
|
||||||
|
|
|
@ -85,6 +85,17 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
public void RecordMovie()
|
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();
|
RecordMovie r = new RecordMovie();
|
||||||
r.ShowDialog();
|
r.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,8 +370,15 @@ namespace BizHawk.MultiClient
|
||||||
private string GetGBAControllersAsMnemonic()
|
private string GetGBAControllersAsMnemonic()
|
||||||
{
|
{
|
||||||
StringBuilder input = new StringBuilder("|");
|
StringBuilder input = new StringBuilder("|");
|
||||||
// there's no power button for now
|
if (IsBasePressed("Power"))
|
||||||
input.Append(".|");
|
{
|
||||||
|
input.Append(Global.COMMANDS[ControlType]["Power"]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
input.Append(".");
|
||||||
|
}
|
||||||
|
input.Append("|");
|
||||||
foreach (string button in Global.BUTTONS[ControlType].Keys)
|
foreach (string button in Global.BUTTONS[ControlType].Keys)
|
||||||
{
|
{
|
||||||
input.Append(IsBasePressed(button) ? Global.BUTTONS[ControlType][button] : ".");
|
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
|
//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)
|
private void SetSNESControllersAsMnemonic(string mnemonic)
|
||||||
{
|
{
|
||||||
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
||||||
|
@ -800,6 +827,11 @@ namespace BizHawk.MultiClient
|
||||||
SetC64ControllersAsMnemonic(mnemonic);
|
SetC64ControllersAsMnemonic(mnemonic);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (ControlType == "GBA Controller")
|
||||||
|
{
|
||||||
|
SetGBAControllersAsMnemonic(mnemonic);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -97,11 +97,7 @@ namespace AMeteor
|
||||||
return m_cart;
|
return m_cart;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteCart()
|
void DeleteCart();
|
||||||
{
|
|
||||||
if (m_cart)
|
|
||||||
delete m_cart;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HasBios () const
|
bool HasBios () const
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
void Memory::SetCartType (uint8_t type)
|
||||||
{
|
{
|
||||||
if (m_cart)
|
if (m_cart)
|
||||||
{
|
{
|
||||||
delete m_cart;
|
delete m_cart;
|
||||||
print_bizhawk("Cart Memory unloaded.\n");
|
print_bizhawk("Cart Memory unloaded.\n");
|
||||||
|
m_cart = NULL;
|
||||||
}
|
}
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue