more mainform code cleanup

This commit is contained in:
adelikat 2013-10-27 13:53:28 +00:00
parent fa40ae718f
commit 9218e298dd
5 changed files with 1217 additions and 1156 deletions

View File

@ -212,7 +212,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo
//check fceux's PowerNES and FCEU_MemoryRand function for more information:
//relevant games: Cybernoid; Minna no Taabou no Nakayoshi Daisakusen; Huang Di; and maybe mechanized attack
for(int i=0;i<0x800;i++) if((i&4)!=0) ram[i] = 0xFF; else ram[i] = 0x00;
//for(int i=0;i<0x800;i++) if((i&4)!=0) ram[i] = 0xFF; else ram[i] = 0x00;
Random r = new Random();
for (int i = 0; i < 0x800; i++)
{
ram[i] = (byte)(r.Next(0, 256));
}
SetupMemoryDomains();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -439,7 +439,7 @@ namespace BizHawk.MultiClient
if (!INTERIM)
{
debuggerToolStripMenuItem.Enabled = false;
NESDebuggerMenuItem.Enabled = false;
//luaConsoleToolStripMenuItem.Enabled = false;
}
@ -857,17 +857,17 @@ namespace BizHawk.MultiClient
system = Global.Game.System;
}
tI83ToolStripMenuItem.Visible = false;
NESToolStripMenuItem.Visible = false;
pCEToolStripMenuItem.Visible = false;
sMSToolStripMenuItem.Visible = false;
gBToolStripMenuItem.Visible = false;
gBAToolStripMenuItem.Visible = false;
atariToolStripMenuItem.Visible = false;
sNESToolStripMenuItem.Visible = false;
colecoToolStripMenuItem.Visible = false;
n64ToolStripMenuItem.Visible = false;
saturnToolStripMenuItem.Visible = false;
TI83SubMenu.Visible = false;
NESSubMenu.Visible = false;
PCESubMenu.Visible = false;
SMSSubMenu.Visible = false;
GBSubMenu.Visible = false;
GBASubMenu.Visible = false;
AtariSubMenu.Visible = false;
SNESSubMenu.Visible = false;
ColecoSubMenu.Visible = false;
N64SubMenu.Visible = false;
SaturnSubMenu.Visible = false;
switch (system)
{
@ -875,66 +875,66 @@ namespace BizHawk.MultiClient
case "GEN":
break;
case "NULL":
n64ToolStripMenuItem.Visible = true;
N64SubMenu.Visible = true;
break;
case "TI83":
tI83ToolStripMenuItem.Visible = true;
TI83SubMenu.Visible = true;
break;
case "NES":
NESToolStripMenuItem.Visible = true;
NESSubMenu.Visible = true;
NESSpeicalMenuControls();
break;
case "PCE":
case "PCECD":
case "SGX":
pCEToolStripMenuItem.Visible = true;
PCESubMenu.Visible = true;
break;
case "SMS":
sMSToolStripMenuItem.Text = "SMS";
sMSToolStripMenuItem.Visible = true;
SMSSubMenu.Text = "SMS";
SMSSubMenu.Visible = true;
break;
case "SG":
sMSToolStripMenuItem.Text = "SG";
sMSToolStripMenuItem.Visible = true;
SMSSubMenu.Text = "SG";
SMSSubMenu.Visible = true;
break;
case "GG":
sMSToolStripMenuItem.Text = "GG";
sMSToolStripMenuItem.Visible = true;
SMSSubMenu.Text = "GG";
SMSSubMenu.Visible = true;
break;
case "GB":
case "GBC":
gBToolStripMenuItem.Visible = true;
GBSubMenu.Visible = true;
break;
case "GBA":
gBAToolStripMenuItem.Visible = true;
GBASubMenu.Visible = true;
break;
case "A26":
atariToolStripMenuItem.Visible = true;
AtariSubMenu.Visible = true;
break;
case "SNES":
case "SGB":
if ((Global.Emulator as LibsnesCore).IsSGB)
sNESToolStripMenuItem.Text = "&SGB";
SNESSubMenu.Text = "&SGB";
else
sNESToolStripMenuItem.Text = "&SNES";
sNESToolStripMenuItem.Visible = true;
SNESSubMenu.Text = "&SNES";
SNESSubMenu.Visible = true;
break;
case "Coleco":
colecoToolStripMenuItem.Visible = true;
ColecoSubMenu.Visible = true;
break;
case "N64":
n64ToolStripMenuItem.Visible = true;
N64SubMenu.Visible = true;
break;
case "SAT":
saturnToolStripMenuItem.Visible = true;
SaturnSubMenu.Visible = true;
break;
}
}
void NESSpeicalMenuAdd(string name, string button, string msg)
{
nESSpeicalToolStripMenuItem.Visible = true;
nESSpeicalToolStripMenuItem.DropDownItems.Add(name, null, delegate
NESSpecialControlsMenuItem.Visible = true;
NESSpecialControlsMenuItem.DropDownItems.Add(name, null, delegate
{
if (Global.Emulator.ControllerDefinition.BoolButtons.Contains(button))
{
@ -950,8 +950,8 @@ namespace BizHawk.MultiClient
void NESSpeicalMenuControls()
{
// ugly and hacky
nESSpeicalToolStripMenuItem.Visible = false;
nESSpeicalToolStripMenuItem.DropDownItems.Clear();
NESSpecialControlsMenuItem.Visible = false;
NESSpecialControlsMenuItem.DropDownItems.Clear();
var ss = Global.Emulator.ControllerDefinition.BoolButtons;
if (ss.Contains("FDS Eject"))
NESSpeicalMenuAdd("Eject Disk", "FDS Eject", "FDS Disk Ejected.");

View File

@ -121,7 +121,7 @@
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="N64PluginSettingsToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="N64PluginSettingsMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAANjr9RwUqgAAACBjSFJNAACH
CAAAjBkAAPxwAACE1AAAe3cAAO0tAAA8/QAAIDiUKOg8AAACJWlDQ1BJQ0MgUHJvZmlsZQAAOMutkz9o