Debugger: Disable break on bus conflicts option when the current board does not have bus conflicts
This commit is contained in:
parent
e197e5ee2b
commit
44b7190ad4
4 changed files with 15 additions and 1 deletions
|
@ -581,6 +581,10 @@ void BaseMapper::Initialize(RomData &romData)
|
|||
case BusConflictType::No: _hasBusConflicts = false; break;
|
||||
}
|
||||
|
||||
if(_hasBusConflicts) {
|
||||
MessageManager::Log("[iNes] Bus conflicts enabled");
|
||||
}
|
||||
|
||||
_saveRam = new uint8_t[_saveRamSize];
|
||||
_workRam = new uint8_t[_workRamSize];
|
||||
|
||||
|
@ -728,7 +732,9 @@ shared_ptr<BaseControlDevice> BaseMapper::GetMapperControlDevice()
|
|||
|
||||
RomInfo BaseMapper::GetRomInfo()
|
||||
{
|
||||
return _romInfo;
|
||||
RomInfo romInfo = _romInfo;
|
||||
romInfo.BusConflicts = _hasBusConflicts ? BusConflictType::Yes : BusConflictType::No;
|
||||
return romInfo;
|
||||
}
|
||||
|
||||
uint32_t BaseMapper::GetMapperDipSwitchCount()
|
||||
|
|
|
@ -1724,6 +1724,7 @@ namespace Mesen.GUI.Debugger
|
|||
private void mnuBreakOptions_DropDownOpening(object sender, EventArgs e)
|
||||
{
|
||||
this.mnuBreakOnDecayedOamRead.Enabled = ConfigManager.Config.EmulationInfo.EnableOamDecay;
|
||||
this.mnuBreakOnBusConflict.Enabled = InteropEmu.GetRomInfo().HasBusConflicts;
|
||||
|
||||
bool isNsf = InteropEmu.IsNsf();
|
||||
mnuBreakOnInit.Visible = isNsf;
|
||||
|
|
|
@ -1731,6 +1731,9 @@ namespace Mesen.GUI
|
|||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool IsChrRam;
|
||||
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool HasBusConflicts;
|
||||
|
||||
public UInt16 MapperId;
|
||||
public UInt32 FilePrgOffset;
|
||||
|
||||
|
@ -1755,6 +1758,7 @@ namespace Mesen.GUI
|
|||
public UInt32 PrgCrc32;
|
||||
public RomFormat Format;
|
||||
public bool IsChrRam;
|
||||
public bool HasBusConflicts;
|
||||
public UInt16 MapperId;
|
||||
public UInt32 FilePrgOffset;
|
||||
public string Sha1;
|
||||
|
@ -1766,6 +1770,7 @@ namespace Mesen.GUI
|
|||
this.PrgCrc32 = romInfo.PrgCrc32;
|
||||
this.Format = romInfo.Format;
|
||||
this.IsChrRam = romInfo.IsChrRam;
|
||||
this.HasBusConflicts = romInfo.HasBusConflicts;
|
||||
this.MapperId = romInfo.MapperId;
|
||||
this.FilePrgOffset = romInfo.FilePrgOffset;
|
||||
this.Sha1 = Encoding.UTF8.GetString(romInfo.Sha1);
|
||||
|
|
|
@ -111,6 +111,7 @@ namespace InteropEmu {
|
|||
uint32_t PrgCrc32;
|
||||
RomFormat Format;
|
||||
bool IsChrRam;
|
||||
bool HasBusConflicts;
|
||||
uint16_t MapperId;
|
||||
uint32_t FilePrgOffset;
|
||||
char Sha1[40];
|
||||
|
@ -405,6 +406,7 @@ namespace InteropEmu {
|
|||
interopRomInfo.PrgCrc32 = romInfo.Hash.PrgCrc32;
|
||||
interopRomInfo.Format = romInfo.Format;
|
||||
interopRomInfo.IsChrRam = romInfo.HasChrRam;
|
||||
interopRomInfo.HasBusConflicts = romInfo.BusConflicts == BusConflictType::Yes;
|
||||
interopRomInfo.MapperId = romInfo.MapperID;
|
||||
interopRomInfo.FilePrgOffset = romInfo.FilePrgOffset;
|
||||
if(romInfo.Hash.Sha1.size() == 40) {
|
||||
|
|
Loading…
Add table
Reference in a new issue