Make GB debugger not load by default when a gb game is loaded, misc cleanups gb related
This commit is contained in:
parent
d3f4da39a3
commit
8096316981
|
@ -4,8 +4,8 @@ using BizHawk.Emulation.CPUs.Z80GB;
|
|||
|
||||
namespace BizHawk.Emulation.Consoles.Gameboy
|
||||
{
|
||||
public partial class Gameboy : IEmulator
|
||||
{
|
||||
public partial class Gameboy : IEmulator
|
||||
{
|
||||
public interface IDebuggerAPI
|
||||
{
|
||||
void DoEvents();
|
||||
|
@ -55,7 +55,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
public ESystemType SystemType;
|
||||
|
||||
public struct TCartFlags
|
||||
{
|
||||
{
|
||||
public bool GBC; //cart indicates itself as GBC aware
|
||||
public bool SGB; //cart indicates itself as SGB aware
|
||||
}
|
||||
|
@ -75,12 +75,12 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
return SetBit8(variable, bit, val != 0);
|
||||
}
|
||||
|
||||
static bool GetBit8(byte variable, int bit)
|
||||
static bool GetBit8(byte variable, int bit)
|
||||
{
|
||||
return (variable & (1 << bit)) != 0;
|
||||
}
|
||||
|
||||
public class TRegisters
|
||||
public class TRegisters
|
||||
{
|
||||
Gameboy gb;
|
||||
public TRegisters(Gameboy gb)
|
||||
|
@ -89,7 +89,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
STAT = new TSTAT(gb);
|
||||
}
|
||||
|
||||
public bool BiosMapped = true;
|
||||
public bool BiosMapped = true;
|
||||
public class TLCDC
|
||||
{
|
||||
byte val;
|
||||
|
@ -174,9 +174,9 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
if ((val & 0x10) == 0)
|
||||
{
|
||||
int ret = SetBit8(0, 0, right) | SetBit8(0, 1, left) | SetBit8(0, 2, up) | SetBit8(0, 3, down);
|
||||
return (byte) (~ret);
|
||||
return (byte)(~ret);
|
||||
}
|
||||
else if((val & 0x10) == 0)
|
||||
else if ((val & 0x10) == 0)
|
||||
{
|
||||
int ret = SetBit8(0, 0, a) | SetBit8(0, 1, b) | SetBit8(0, 2, select) | SetBit8(0, 3, start);
|
||||
return (byte)(~ret);
|
||||
|
@ -213,7 +213,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
sanity++;
|
||||
if (sanity == 100000)
|
||||
{
|
||||
if(DebuggerAPI != null) DebuggerAPI.DoEvents();
|
||||
if (DebuggerAPI != null) DebuggerAPI.DoEvents();
|
||||
if (DebugBreak) break;
|
||||
sanity = 0;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
}
|
||||
}
|
||||
|
||||
public void DetachBios()
|
||||
public void DetachBios()
|
||||
{
|
||||
Registers.BiosMapped = false;
|
||||
Cpu.ReadMemory = ReadMemory;
|
||||
|
@ -250,24 +250,24 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
|
||||
public TSound Sound;
|
||||
|
||||
public byte[] Rom;
|
||||
public byte[] Rom;
|
||||
public byte[] WRam;
|
||||
public byte[] SRam;
|
||||
public byte[] VRam;
|
||||
public byte[] HRam;
|
||||
public byte[] OAM;
|
||||
|
||||
public Z80 Cpu;
|
||||
public Z80 Cpu;
|
||||
public MemoryMapper Mapper;
|
||||
|
||||
public Gameboy()
|
||||
{
|
||||
public Gameboy()
|
||||
{
|
||||
CoreOutputComm = new CoreOutputComm();
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadGame(IGame game)
|
||||
{
|
||||
Rom = game.GetRomData();
|
||||
public void LoadGame(IGame game)
|
||||
{
|
||||
Rom = game.GetRomData();
|
||||
|
||||
//inspect mapper and GBC flags
|
||||
CartType = (ECartType)Rom[0x0147];
|
||||
|
@ -276,7 +276,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
CartFlags.SGB = Rom[0x0146] == 0x03;
|
||||
|
||||
HardReset();
|
||||
}
|
||||
}
|
||||
|
||||
public bool BootFromBios = true;
|
||||
|
||||
|
@ -333,7 +333,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
//we speculate that the bios unmaps itself after the first read of 0x100
|
||||
if (addr < 0x100)
|
||||
return Bios[addr];
|
||||
else if(addr == 0x100)
|
||||
else if (addr == 0x100)
|
||||
DetachBios();
|
||||
return ReadMemory(addr);
|
||||
}
|
||||
|
@ -365,9 +365,9 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
else return "HRAM";
|
||||
}
|
||||
|
||||
public byte ReadMemory(ushort addr)
|
||||
{
|
||||
if (addr < 0x8000)
|
||||
public byte ReadMemory(ushort addr)
|
||||
{
|
||||
if (addr < 0x8000)
|
||||
return Rom[addr];
|
||||
else if (addr < 0xA000)
|
||||
return VRam[addr - 0x8000];
|
||||
|
@ -388,7 +388,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
else if (addr < 0xFFFF)
|
||||
return HRam[addr - 0xFF80];
|
||||
else return ReadRegister(addr);
|
||||
}
|
||||
}
|
||||
|
||||
public byte ReadRegister(ushort addr)
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
case 0xFF14: //REG_NR14 - Sound Mode 1 register, Frequency hi (R/W)
|
||||
return 0xFF;
|
||||
|
||||
//0xFF15 ???????????????
|
||||
//0xFF15 ???????????????
|
||||
|
||||
case 0xFF16: //REG_NR21 - Sound Mode 2 register, Sound Length; Wave Pattern Duty (R/W)
|
||||
return 0xFF;
|
||||
|
@ -458,14 +458,22 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
return 0xFF;
|
||||
case 0xFF26: //REG_NR52 - Sound on/off (R/W) (Value at reset: $F1-GB, $F0-SGB)
|
||||
return 0xFF;
|
||||
case 0xFF30: return Sound.WavePatternRam[0x00]; case 0xFF31: return Sound.WavePatternRam[0x01];
|
||||
case 0xFF32: return Sound.WavePatternRam[0x02]; case 0xFF33: return Sound.WavePatternRam[0x03];
|
||||
case 0xFF34: return Sound.WavePatternRam[0x04]; case 0xFF35: return Sound.WavePatternRam[0x05];
|
||||
case 0xFF36: return Sound.WavePatternRam[0x06]; case 0xFF37: return Sound.WavePatternRam[0x07];
|
||||
case 0xFF38: return Sound.WavePatternRam[0x08]; case 0xFF39: return Sound.WavePatternRam[0x09];
|
||||
case 0xFF3A: return Sound.WavePatternRam[0x0A]; case 0xFF3B: return Sound.WavePatternRam[0x0B];
|
||||
case 0xFF3C: return Sound.WavePatternRam[0x0C]; case 0xFF3D: return Sound.WavePatternRam[0x0D];
|
||||
case 0xFF3E: return Sound.WavePatternRam[0x0E]; case 0xFF3F: return Sound.WavePatternRam[0x0F];
|
||||
case 0xFF30: return Sound.WavePatternRam[0x00];
|
||||
case 0xFF31: return Sound.WavePatternRam[0x01];
|
||||
case 0xFF32: return Sound.WavePatternRam[0x02];
|
||||
case 0xFF33: return Sound.WavePatternRam[0x03];
|
||||
case 0xFF34: return Sound.WavePatternRam[0x04];
|
||||
case 0xFF35: return Sound.WavePatternRam[0x05];
|
||||
case 0xFF36: return Sound.WavePatternRam[0x06];
|
||||
case 0xFF37: return Sound.WavePatternRam[0x07];
|
||||
case 0xFF38: return Sound.WavePatternRam[0x08];
|
||||
case 0xFF39: return Sound.WavePatternRam[0x09];
|
||||
case 0xFF3A: return Sound.WavePatternRam[0x0A];
|
||||
case 0xFF3B: return Sound.WavePatternRam[0x0B];
|
||||
case 0xFF3C: return Sound.WavePatternRam[0x0C];
|
||||
case 0xFF3D: return Sound.WavePatternRam[0x0D];
|
||||
case 0xFF3E: return Sound.WavePatternRam[0x0E];
|
||||
case 0xFF3F: return Sound.WavePatternRam[0x0F];
|
||||
case 0xFF40: //REG_LCDC - LCD Control (R/W) (value $91 at reset)
|
||||
return Registers.LCDC.Read();
|
||||
case 0xFF41: //REG_STAT - LCDC Status (R/W)
|
||||
|
@ -566,14 +574,22 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
return;
|
||||
case 0xFF26: //REG_NR52 - Sound on/off (R/W) (Value at reset: $F1-GB, $F0-SGB)
|
||||
return;
|
||||
case 0xFF30: Sound.WavePatternRam[0x00] = value; break; case 0xFF31: Sound.WavePatternRam[0x01] = value; break;
|
||||
case 0xFF32: Sound.WavePatternRam[0x02] = value; break; case 0xFF33: Sound.WavePatternRam[0x03] = value; break;
|
||||
case 0xFF34: Sound.WavePatternRam[0x04] = value; break; case 0xFF35: Sound.WavePatternRam[0x05] = value; break;
|
||||
case 0xFF36: Sound.WavePatternRam[0x06] = value; break; case 0xFF37: Sound.WavePatternRam[0x07] = value; break;
|
||||
case 0xFF38: Sound.WavePatternRam[0x08] = value; break; case 0xFF39: Sound.WavePatternRam[0x09] = value; break;
|
||||
case 0xFF3A: Sound.WavePatternRam[0x0A] = value; break; case 0xFF3B: Sound.WavePatternRam[0x0B] = value; break;
|
||||
case 0xFF3C: Sound.WavePatternRam[0x0C] = value; break; case 0xFF3D: Sound.WavePatternRam[0x0D] = value; break;
|
||||
case 0xFF3E: Sound.WavePatternRam[0x0E] = value; break; case 0xFF3F: Sound.WavePatternRam[0x0F] = value; break;
|
||||
case 0xFF30: Sound.WavePatternRam[0x00] = value; break;
|
||||
case 0xFF31: Sound.WavePatternRam[0x01] = value; break;
|
||||
case 0xFF32: Sound.WavePatternRam[0x02] = value; break;
|
||||
case 0xFF33: Sound.WavePatternRam[0x03] = value; break;
|
||||
case 0xFF34: Sound.WavePatternRam[0x04] = value; break;
|
||||
case 0xFF35: Sound.WavePatternRam[0x05] = value; break;
|
||||
case 0xFF36: Sound.WavePatternRam[0x06] = value; break;
|
||||
case 0xFF37: Sound.WavePatternRam[0x07] = value; break;
|
||||
case 0xFF38: Sound.WavePatternRam[0x08] = value; break;
|
||||
case 0xFF39: Sound.WavePatternRam[0x09] = value; break;
|
||||
case 0xFF3A: Sound.WavePatternRam[0x0A] = value; break;
|
||||
case 0xFF3B: Sound.WavePatternRam[0x0B] = value; break;
|
||||
case 0xFF3C: Sound.WavePatternRam[0x0C] = value; break;
|
||||
case 0xFF3D: Sound.WavePatternRam[0x0D] = value; break;
|
||||
case 0xFF3E: Sound.WavePatternRam[0x0E] = value; break;
|
||||
case 0xFF3F: Sound.WavePatternRam[0x0F] = value; break;
|
||||
case 0xFF40: //REG_LCDC - LCD Control (R/W) (value $91 at reset)
|
||||
Registers.LCDC.Write(value);
|
||||
break;
|
||||
|
@ -608,8 +624,8 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
}
|
||||
}
|
||||
|
||||
public void WriteMemory(ushort addr, byte value)
|
||||
{
|
||||
public void WriteMemory(ushort addr, byte value)
|
||||
{
|
||||
if (addr < 0x8000)
|
||||
return;
|
||||
else if (addr < 0xA000)
|
||||
|
@ -627,80 +643,81 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
else if (addr < 0xFF00)
|
||||
return;
|
||||
else if (addr < 0xFF80)
|
||||
WriteRegister(addr,value);
|
||||
WriteRegister(addr, value);
|
||||
else if (addr < 0xFFFF)
|
||||
HRam[addr - 0xFF80] = value;
|
||||
else WriteRegister(addr, value);
|
||||
}
|
||||
}
|
||||
|
||||
public void FrameAdvance(bool render)
|
||||
{
|
||||
//Cpu.ExecuteCycles(4096);
|
||||
}
|
||||
{
|
||||
Cpu.ExecuteCycles(4096);
|
||||
}
|
||||
|
||||
|
||||
public CoreInputComm CoreInputComm { get; set; }
|
||||
public CoreOutputComm CoreOutputComm { get; private set; }
|
||||
|
||||
public IVideoProvider VideoProvider
|
||||
{
|
||||
public IVideoProvider VideoProvider
|
||||
{
|
||||
get { return new NullEmulator(); }
|
||||
}
|
||||
}
|
||||
|
||||
public ISoundProvider SoundProvider
|
||||
{
|
||||
public ISoundProvider SoundProvider
|
||||
{
|
||||
get { return new NullEmulator(); }
|
||||
}
|
||||
}
|
||||
|
||||
public int Frame
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
public int Frame
|
||||
{
|
||||
get { return 0; }
|
||||
//get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public int LagCount { get { return -1; } set { return; } } //TODO: implement
|
||||
public bool IsLagFrame { get { return false; } } //TODO: implement
|
||||
public int LagCount { get { return -1; } set { return; } } //TODO: implement
|
||||
public bool IsLagFrame { get { return false; } } //TODO: implement
|
||||
|
||||
public byte[] SaveRam
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
public byte[] SaveRam
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool SaveRamModified
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool SaveRamModified
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveStateText(System.IO.TextWriter writer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public void SaveStateText(System.IO.TextWriter writer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void LoadStateText(System.IO.TextReader reader)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public void LoadStateText(System.IO.TextReader reader)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SaveStateBinary(System.IO.BinaryWriter writer)
|
||||
{
|
||||
public void SaveStateBinary(System.IO.BinaryWriter writer)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadStateBinary(System.IO.BinaryReader reader)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public void LoadStateBinary(System.IO.BinaryReader reader)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public byte[] SaveStateBinary()
|
||||
{
|
||||
public byte[] SaveStateBinary()
|
||||
{
|
||||
return new byte[0];
|
||||
}
|
||||
}
|
||||
|
||||
public void RenderOBJLine(int line, byte[] output, bool limit)
|
||||
{
|
||||
|
@ -723,10 +740,10 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
for (int i = sprites.Count - 1; i >= 0; i--)
|
||||
{
|
||||
int s = sprites[i];
|
||||
int y = OAM[s*4 + 0];
|
||||
int x = OAM[s*4 + 1];
|
||||
int pat = OAM[s*4 + 2];
|
||||
byte flags = OAM[s*4 + 3];
|
||||
int y = OAM[s * 4 + 0];
|
||||
int x = OAM[s * 4 + 1];
|
||||
int pat = OAM[s * 4 + 2];
|
||||
byte flags = OAM[s * 4 + 3];
|
||||
bool priority = GetBit8(flags, 7);
|
||||
bool yflip = GetBit8(flags, 6);
|
||||
bool xflip = GetBit8(flags, 5);
|
||||
|
@ -736,7 +753,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
x -= 8;
|
||||
|
||||
int sprline = line - y;
|
||||
if(yflip)
|
||||
if (yflip)
|
||||
sprline = height - sprline - 1;
|
||||
|
||||
if (height == 16) pat = ~1;
|
||||
|
@ -770,7 +787,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
lobits &= 1;
|
||||
hibits &= 1;
|
||||
int pixel = lobits | (hibits << 1);
|
||||
output[x] = (byte) pixel;
|
||||
output[x] = (byte)pixel;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -808,7 +825,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
}
|
||||
}
|
||||
|
||||
public void RenderBGLine(int line, byte[] output, bool scroll)
|
||||
public void RenderBGLine(int line, byte[] output, bool scroll)
|
||||
{
|
||||
ushort tilemap = Registers.LCDC.BgTileMapAddr;
|
||||
ushort tiledata = Registers.LCDC.TileDataAddr;
|
||||
|
@ -816,7 +833,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
int tileAdjust = (Registers.LCDC.TileData == TRegisters.TLCDC.ETileData.Region_8800_97FF ? 128 : 0);
|
||||
|
||||
int py = line;
|
||||
if(scroll) line += Registers.SCY;
|
||||
if (scroll) line += Registers.SCY;
|
||||
py &= 0xFF;
|
||||
int ty = py >> 3;
|
||||
int tyr = py & 7;
|
||||
|
@ -825,7 +842,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
for (int x = 0; x < 160; x++)
|
||||
{
|
||||
int px = x;
|
||||
if(scroll) px += Registers.SCX;
|
||||
if (scroll) px += Registers.SCX;
|
||||
px &= 0xFF;
|
||||
int tx = px >> 3;
|
||||
int txr = px & 7;
|
||||
|
@ -834,7 +851,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
int tileNum = ReadMemory((ushort)tileAddr);
|
||||
tileNum = (tileNum + tileAdjust) & 0xFF;
|
||||
ushort patternAddr = (ushort)(tiledata + (tileNum << 4));
|
||||
patternAddr += (ushort)(tyr<<1);
|
||||
patternAddr += (ushort)(tyr << 1);
|
||||
|
||||
int lobits = ReadMemory(patternAddr);
|
||||
patternAddr += 1;
|
||||
|
@ -849,12 +866,12 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
|
||||
}
|
||||
|
||||
public bool DeterministicEmulation { get; set; }
|
||||
public string SystemId { get { return "GB"; } }
|
||||
public bool DeterministicEmulation { get; set; }
|
||||
public string SystemId { get { return "GB"; } }
|
||||
|
||||
public IList<MemoryDomain> MemoryDomains { get { throw new NotImplementedException(); } }
|
||||
public MemoryDomain MainMemory { get { throw new NotImplementedException(); } }
|
||||
public IList<MemoryDomain> MemoryDomains { get { throw new NotImplementedException(); } }
|
||||
public MemoryDomain MainMemory { get { throw new NotImplementedException(); } }
|
||||
|
||||
public void Dispose() {}
|
||||
}
|
||||
public void Dispose() { }
|
||||
}
|
||||
}
|
|
@ -1,27 +1,17 @@
|
|||
namespace BizHawk.Emulation.Consoles.Gameboy
|
||||
{
|
||||
public partial class Gameboy
|
||||
{
|
||||
public static readonly ControllerDefinition GbController = new ControllerDefinition
|
||||
{
|
||||
Name = "Gameboy Controller",
|
||||
BoolButtons =
|
||||
{
|
||||
"Up", "Down", "Left", "Right", "A", "B", "Select", "Start"
|
||||
}
|
||||
};
|
||||
public partial class Gameboy
|
||||
{
|
||||
public static readonly ControllerDefinition GbController = new ControllerDefinition
|
||||
{
|
||||
Name = "Gameboy Controller",
|
||||
BoolButtons =
|
||||
{
|
||||
"Up", "Down", "Left", "Right", "A", "B", "Select", "Start"
|
||||
}
|
||||
};
|
||||
|
||||
public void SetControllersAsMnemonic(string mnemonic)
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
||||
public string GetControllersAsMnemonic()
|
||||
{
|
||||
return "|........|0|";
|
||||
}
|
||||
|
||||
public ControllerDefinition ControllerDefinition { get { return GbController; } }
|
||||
public IController Controller { get; set; }
|
||||
}
|
||||
public ControllerDefinition ControllerDefinition { get { return GbController; } }
|
||||
public IController Controller { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,79 +1,79 @@
|
|||
namespace BizHawk.Emulation.Consoles.Sega
|
||||
{
|
||||
public partial class SMS
|
||||
{
|
||||
public static readonly ControllerDefinition SmsController = new ControllerDefinition
|
||||
{
|
||||
Name = "SMS Controller",
|
||||
BoolButtons =
|
||||
{
|
||||
"Reset", "Pause",
|
||||
"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 B1", "P1 B2",
|
||||
"P2 Up", "P2 Down", "P2 Left", "P2 Right", "P2 B1", "P2 B2"
|
||||
}
|
||||
};
|
||||
public partial class SMS
|
||||
{
|
||||
public static readonly ControllerDefinition SmsController = new ControllerDefinition
|
||||
{
|
||||
Name = "SMS Controller",
|
||||
BoolButtons =
|
||||
{
|
||||
"Reset", "Pause",
|
||||
"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 B1", "P1 B2",
|
||||
"P2 Up", "P2 Down", "P2 Left", "P2 Right", "P2 B1", "P2 B2"
|
||||
}
|
||||
};
|
||||
|
||||
public ControllerDefinition ControllerDefinition { get { return SmsController; } }
|
||||
public IController Controller { get; set; }
|
||||
public ControllerDefinition ControllerDefinition { get { return SmsController; } }
|
||||
public IController Controller { get; set; }
|
||||
|
||||
private byte ReadControls1()
|
||||
{
|
||||
lagged = false;
|
||||
byte value = 0xFF;
|
||||
private byte ReadControls1()
|
||||
{
|
||||
lagged = false;
|
||||
byte value = 0xFF;
|
||||
|
||||
if (Controller["P1 Up"]) value &= 0xFE;
|
||||
if (Controller["P1 Down"]) value &= 0xFD;
|
||||
if (Controller["P1 Left"]) value &= 0xFB;
|
||||
if (Controller["P1 Right"]) value &= 0xF7;
|
||||
if (Controller["P1 B1"]) value &= 0xEF;
|
||||
if (Controller["P1 B2"]) value &= 0xDF;
|
||||
if (Controller["P1 Up"]) value &= 0xFE;
|
||||
if (Controller["P1 Down"]) value &= 0xFD;
|
||||
if (Controller["P1 Left"]) value &= 0xFB;
|
||||
if (Controller["P1 Right"]) value &= 0xF7;
|
||||
if (Controller["P1 B1"]) value &= 0xEF;
|
||||
if (Controller["P1 B2"]) value &= 0xDF;
|
||||
|
||||
if (Controller["P2 Up"]) value &= 0xBF;
|
||||
if (Controller["P2 Down"]) value &= 0x7F;
|
||||
if (Controller["P2 Up"]) value &= 0xBF;
|
||||
if (Controller["P2 Down"]) value &= 0x7F;
|
||||
|
||||
return value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private byte ReadControls2()
|
||||
{
|
||||
lagged = false;
|
||||
byte value = 0xFF;
|
||||
private byte ReadControls2()
|
||||
{
|
||||
lagged = false;
|
||||
byte value = 0xFF;
|
||||
|
||||
if (Controller["P2 Left"]) value &= 0xFE;
|
||||
if (Controller["P2 Right"]) value &= 0xFD;
|
||||
if (Controller["P2 B1"]) value &= 0xFB;
|
||||
if (Controller["P2 B2"]) value &= 0xF7;
|
||||
if (Controller["P2 Left"]) value &= 0xFE;
|
||||
if (Controller["P2 Right"]) value &= 0xFD;
|
||||
if (Controller["P2 B1"]) value &= 0xFB;
|
||||
if (Controller["P2 B2"]) value &= 0xF7;
|
||||
|
||||
if (Controller["Reset"]) value &= 0xEF;
|
||||
if (Controller["Reset"]) value &= 0xEF;
|
||||
|
||||
if ((Port3F & 0x0F) == 5)
|
||||
{
|
||||
if (region == "Japan")
|
||||
{
|
||||
value &= 0x3F;
|
||||
}
|
||||
else // US / Europe
|
||||
{
|
||||
if (Port3F >> 4 == 0x0F)
|
||||
value |= 0xC0;
|
||||
else
|
||||
value &= 0x3F;
|
||||
}
|
||||
}
|
||||
if ((Port3F & 0x0F) == 5)
|
||||
{
|
||||
if (region == "Japan")
|
||||
{
|
||||
value &= 0x3F;
|
||||
}
|
||||
else // US / Europe
|
||||
{
|
||||
if (Port3F >> 4 == 0x0F)
|
||||
value |= 0xC0;
|
||||
else
|
||||
value &= 0x3F;
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private byte ReadPort0()
|
||||
{
|
||||
if (IsGameGear == false)
|
||||
return 0xFF;
|
||||
byte value = 0xFF;
|
||||
if (Controller["Pause"])
|
||||
value ^= 0x80;
|
||||
if (Region == "US")
|
||||
value ^= 0x40;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
private byte ReadPort0()
|
||||
{
|
||||
if (IsGameGear == false)
|
||||
return 0xFF;
|
||||
byte value = 0xFF;
|
||||
if (Controller["Pause"])
|
||||
value ^= 0x80;
|
||||
if (Region == "US")
|
||||
value ^= 0x40;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -234,6 +234,10 @@
|
|||
public int NESBackgroundColor = 0;
|
||||
public string NESPaletteFile = "";
|
||||
|
||||
//GB Debugger settings
|
||||
public bool AutoloadGBDebugger = false;
|
||||
public bool GBDebuggerSaveWindowPosition = true;
|
||||
|
||||
// Cheats Dialog
|
||||
public bool AutoLoadCheats = false;
|
||||
public bool CheatsSaveWindowPosition = true;
|
||||
|
|
|
@ -57,6 +57,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
|
||||
this.viewDisassembly = new BizHawk.Core.ViewportPanel();
|
||||
this.btnSeekPC = new System.Windows.Forms.Button();
|
||||
this.btnSeekUser = new System.Windows.Forms.Button();
|
||||
this.txtSeekUser = new System.Windows.Forms.TextBox();
|
||||
|
@ -74,22 +75,28 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.txtLine = new System.Windows.Forms.TextBox();
|
||||
this.txtDot = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panelMemory = new BizHawk.Core.ScrollableViewportPanel();
|
||||
this.checkViewBg = new System.Windows.Forms.CheckBox();
|
||||
this.checkViewObj = new System.Windows.Forms.CheckBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.checkViewObjNoLimit = new System.Windows.Forms.CheckBox();
|
||||
this.lblInputActive = new System.Windows.Forms.Label();
|
||||
this.viewTiles0x9000 = new ViewportPanel();
|
||||
this.viewTiles0x8000 = new ViewportPanel();
|
||||
this.panelMemory = new ScrollableViewportPanel();
|
||||
this.viewDisassembly = new ViewportPanel();
|
||||
this.viewBG = new ViewportPanel();
|
||||
this.viewTiles0x9000 = new BizHawk.Core.ViewportPanel();
|
||||
this.viewTiles0x8000 = new BizHawk.Core.ViewportPanel();
|
||||
this.viewBG = new BizHawk.Core.ViewportPanel();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.restoreWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
this.menuContextBreakpoints.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnRun
|
||||
|
@ -372,6 +379,15 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.vScrollBar1.TabIndex = 20;
|
||||
this.vScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.vScrollBar1_Scroll);
|
||||
//
|
||||
// viewDisassembly
|
||||
//
|
||||
this.viewDisassembly.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.viewDisassembly.Location = new System.Drawing.Point(3, 3);
|
||||
this.viewDisassembly.Name = "viewDisassembly";
|
||||
this.viewDisassembly.Size = new System.Drawing.Size(328, 199);
|
||||
this.viewDisassembly.TabIndex = 0;
|
||||
this.viewDisassembly.Paint += new System.Windows.Forms.PaintEventHandler(this.viewDisassembly_Paint);
|
||||
//
|
||||
// btnSeekPC
|
||||
//
|
||||
this.btnSeekPC.Location = new System.Drawing.Point(489, 100);
|
||||
|
@ -405,7 +421,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
//
|
||||
this.listBreakpoints.ContextMenuStrip = this.menuContextBreakpoints;
|
||||
this.listBreakpoints.FormattingEnabled = true;
|
||||
this.listBreakpoints.Location = new System.Drawing.Point(915, 245);
|
||||
this.listBreakpoints.Location = new System.Drawing.Point(564, 386);
|
||||
this.listBreakpoints.Name = "listBreakpoints";
|
||||
this.listBreakpoints.Size = new System.Drawing.Size(120, 95);
|
||||
this.listBreakpoints.TabIndex = 25;
|
||||
|
@ -434,7 +450,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(912, 227);
|
||||
this.label10.Location = new System.Drawing.Point(561, 370);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(63, 13);
|
||||
this.label10.TabIndex = 26;
|
||||
|
@ -521,6 +537,19 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.panel1.Size = new System.Drawing.Size(545, 181);
|
||||
this.panel1.TabIndex = 38;
|
||||
//
|
||||
// panelMemory
|
||||
//
|
||||
this.panelMemory.AutoSize = true;
|
||||
this.panelMemory.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelMemory.Location = new System.Drawing.Point(0, 0);
|
||||
this.panelMemory.Name = "panelMemory";
|
||||
this.panelMemory.ScrollLargeChange = 10;
|
||||
this.panelMemory.ScrollMax = 4095;
|
||||
this.panelMemory.Size = new System.Drawing.Size(541, 177);
|
||||
this.panelMemory.TabIndex = 37;
|
||||
this.panelMemory.Paint += new System.Windows.Forms.PaintEventHandler(this.panelMemory_Paint);
|
||||
this.panelMemory.Scroll += new System.Windows.Forms.ScrollEventHandler(this.panelMemory_Scroll);
|
||||
//
|
||||
// checkViewBg
|
||||
//
|
||||
this.checkViewBg.AutoSize = true;
|
||||
|
@ -603,28 +632,6 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.viewTiles0x8000.TabIndex = 41;
|
||||
this.viewTiles0x8000.Paint += new System.Windows.Forms.PaintEventHandler(this.viewTiles0x8000_Paint);
|
||||
//
|
||||
// panelMemory
|
||||
//
|
||||
this.panelMemory.AutoSize = true;
|
||||
this.panelMemory.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelMemory.Location = new System.Drawing.Point(0, 0);
|
||||
this.panelMemory.Name = "panelMemory";
|
||||
this.panelMemory.ScrollLargeChange = 10;
|
||||
this.panelMemory.ScrollMax = 4095;
|
||||
this.panelMemory.Size = new System.Drawing.Size(541, 177);
|
||||
this.panelMemory.TabIndex = 37;
|
||||
this.panelMemory.Paint += new System.Windows.Forms.PaintEventHandler(this.panelMemory_Paint);
|
||||
this.panelMemory.Scroll += new System.Windows.Forms.ScrollEventHandler(this.panelMemory_Scroll);
|
||||
//
|
||||
// viewDisassembly
|
||||
//
|
||||
this.viewDisassembly.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.viewDisassembly.Location = new System.Drawing.Point(3, 3);
|
||||
this.viewDisassembly.Name = "viewDisassembly";
|
||||
this.viewDisassembly.Size = new System.Drawing.Size(328, 199);
|
||||
this.viewDisassembly.TabIndex = 0;
|
||||
this.viewDisassembly.Paint += new System.Windows.Forms.PaintEventHandler(this.viewDisassembly_Paint);
|
||||
//
|
||||
// viewBG
|
||||
//
|
||||
this.viewBG.Location = new System.Drawing.Point(564, 27);
|
||||
|
@ -638,11 +645,58 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.viewBG.Enter += new System.EventHandler(this.viewBG_Enter);
|
||||
this.viewBG.KeyDown += new System.Windows.Forms.KeyEventHandler(this.viewBG_KeyDown);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.settingsToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(867, 24);
|
||||
this.menuStrip1.TabIndex = 47;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.autoloadToolStripMenuItem,
|
||||
this.saveWindowPositionToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.restoreWindowSizeToolStripMenuItem});
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(58, 20);
|
||||
this.settingsToolStripMenuItem.Text = "&Settings";
|
||||
this.settingsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.settingsToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// autoloadToolStripMenuItem
|
||||
//
|
||||
this.autoloadToolStripMenuItem.Name = "autoloadToolStripMenuItem";
|
||||
this.autoloadToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
|
||||
this.autoloadToolStripMenuItem.Text = "Autoload";
|
||||
this.autoloadToolStripMenuItem.Click += new System.EventHandler(this.autoloadToolStripMenuItem_Click);
|
||||
//
|
||||
// saveWindowPositionToolStripMenuItem
|
||||
//
|
||||
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
|
||||
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
|
||||
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
|
||||
//
|
||||
// restoreWindowSizeToolStripMenuItem
|
||||
//
|
||||
this.restoreWindowSizeToolStripMenuItem.Name = "restoreWindowSizeToolStripMenuItem";
|
||||
this.restoreWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
|
||||
this.restoreWindowSizeToolStripMenuItem.Text = "Restore Window Size";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(187, 6);
|
||||
//
|
||||
// Debugger
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1065, 483);
|
||||
this.ClientSize = new System.Drawing.Size(867, 483);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Controls.Add(this.lblInputActive);
|
||||
this.Controls.Add(this.checkViewObjNoLimit);
|
||||
this.Controls.Add(this.viewTiles0x9000);
|
||||
|
@ -659,10 +713,10 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.btnBreak);
|
||||
this.Controls.Add(this.txtFrame);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.tableLayoutPanel2);
|
||||
this.Controls.Add(this.listBreakpoints);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.txtSeekUser);
|
||||
this.Controls.Add(this.listBreakpoints);
|
||||
this.Controls.Add(this.viewBG);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.btnSeekUser);
|
||||
|
@ -682,8 +736,10 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.Controls.Add(this.btnRun);
|
||||
this.Controls.Add(this.label1);
|
||||
this.KeyPreview = true;
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "Debugger";
|
||||
this.Text = "Debugger";
|
||||
this.Text = "Game Boy Debugger";
|
||||
this.Load += new System.EventHandler(this.Debugger_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
|
@ -692,6 +748,8 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
this.menuContextBreakpoints.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -753,6 +811,12 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.CheckBox checkViewObjNoLimit;
|
||||
private System.Windows.Forms.Label lblInputActive;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem restoreWindowSizeToolStripMenuItem;
|
||||
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@ using System.Runtime.InteropServices;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using BizHawk.Core;
|
||||
using BizHawk.MultiClient;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Gameboy
|
||||
{
|
||||
|
@ -384,5 +385,20 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
}
|
||||
}
|
||||
|
||||
private void Debugger_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void autoloadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.AutoloadGBDebugger ^= true;
|
||||
}
|
||||
|
||||
private void settingsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
autoloadToolStripMenuItem.Checked = Global.Config.AutoloadGBDebugger;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,7 @@
|
|||
<metadata name="timerRunUpdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>193, 17</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>325, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -197,6 +197,8 @@
|
|||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.debuggerToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.DumpError = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
|
@ -234,11 +236,12 @@
|
|||
this.toolsToolStripMenuItem,
|
||||
this.NESToolStripMenuItem,
|
||||
this.tI83ToolStripMenuItem,
|
||||
this.gBToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(470, 21);
|
||||
this.menuStrip1.Size = new System.Drawing.Size(470, 40);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
this.menuStrip1.MenuDeactivate += new System.EventHandler(this.menuStrip1_MenuDeactivate);
|
||||
|
@ -1554,6 +1557,21 @@
|
|||
this.aboutToolStripMenuItem.Text = "&About";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||
//
|
||||
// gBToolStripMenuItem
|
||||
//
|
||||
this.gBToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.debuggerToolStripMenuItem1});
|
||||
this.gBToolStripMenuItem.Name = "gBToolStripMenuItem";
|
||||
this.gBToolStripMenuItem.Size = new System.Drawing.Size(32, 17);
|
||||
this.gBToolStripMenuItem.Text = "GB";
|
||||
//
|
||||
// debuggerToolStripMenuItem1
|
||||
//
|
||||
this.debuggerToolStripMenuItem1.Name = "debuggerToolStripMenuItem1";
|
||||
this.debuggerToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
|
||||
this.debuggerToolStripMenuItem1.Text = "Debugger";
|
||||
this.debuggerToolStripMenuItem1.Click += new System.EventHandler(this.debuggerToolStripMenuItem1_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -1624,7 +1642,7 @@
|
|||
this.screenshotToolStripMenuItem1,
|
||||
this.closeROMToolStripMenuItem1});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(179, 308);
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(179, 286);
|
||||
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
|
||||
this.contextMenuStrip1.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.contextMenuStrip1_Closing);
|
||||
//
|
||||
|
@ -1949,6 +1967,8 @@
|
|||
private System.Windows.Forms.ToolStripDropDownButton DumpError;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewSubtitlesToolStripMenuItem;
|
||||
private MenuStripEx menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem gBToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem debuggerToolStripMenuItem1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ namespace BizHawk.MultiClient
|
|||
public ToolBox ToolBox1 = new ToolBox();
|
||||
public TI83KeyPad TI83KeyPad1 = new TI83KeyPad();
|
||||
public TAStudio TAStudio1 = new TAStudio();
|
||||
public Debugger GBDebugger1 = new Debugger(null);
|
||||
|
||||
public MainForm(string[] args)
|
||||
{
|
||||
|
@ -686,14 +687,22 @@ namespace BizHawk.MultiClient
|
|||
case "TI83":
|
||||
tI83ToolStripMenuItem.Visible = true;
|
||||
NESToolStripMenuItem.Visible = false;
|
||||
gBToolStripMenuItem.Visible = false;
|
||||
break;
|
||||
case "NES":
|
||||
NESToolStripMenuItem.Visible = true;
|
||||
tI83ToolStripMenuItem.Visible = false;
|
||||
gBToolStripMenuItem.Visible = false;
|
||||
break;
|
||||
case "GB": //TODO: SGB, etc?
|
||||
NESToolStripMenuItem.Visible = false;
|
||||
tI83ToolStripMenuItem.Visible = false;
|
||||
gBToolStripMenuItem.Visible = true;
|
||||
break;
|
||||
default:
|
||||
tI83ToolStripMenuItem.Visible = false;
|
||||
NESToolStripMenuItem.Visible = false;
|
||||
gBToolStripMenuItem.Visible = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -836,11 +845,6 @@ namespace BizHawk.MultiClient
|
|||
if (File.Exists(game.SaveRamPath))
|
||||
LoadSaveRam();
|
||||
|
||||
if (game.System == "GB")
|
||||
{
|
||||
new BizHawk.Emulation.Consoles.Gameboy.Debugger(Global.Emulator as Gameboy).Show();
|
||||
}
|
||||
|
||||
if (UserMovie.GetMovieMode() != MOVIEMODE.INACTIVE)
|
||||
{
|
||||
InputLog.SetHeaderLine(MovieHeader.PLATFORM, Global.Emulator.SystemId);
|
||||
|
@ -2256,5 +2260,14 @@ namespace BizHawk.MultiClient
|
|||
s.GetMovie(UserMovie);
|
||||
s.ShowDialog();
|
||||
}
|
||||
|
||||
private void debuggerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is Gameboy)
|
||||
{
|
||||
Debugger gbDebugger = new Debugger(Global.Emulator as Gameboy);
|
||||
gbDebugger.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue