Debugger: Fixed source view mode regressions

This commit is contained in:
Sour 2020-02-26 19:26:14 -05:00
parent e9e88da0cb
commit 9b27cc109e
2 changed files with 3 additions and 3 deletions

View file

@ -483,7 +483,7 @@ AddressInfo Debugger::GetRelativeAddress(AddressInfo absAddress, CpuType cpuType
if(absAddress.Type == SnesMemoryType::WorkRam) {
startBank = 0x7E;
} else {
startBank = (_cpu->GetState().K & 0xC0) << 4;
startBank = _cpu->GetState().K & 0xC0;
}
} else if(cpuType == CpuType::Sa1) {
startBank = (_cart->GetSa1()->GetCpuState().K & 0xC0);

View file

@ -75,7 +75,7 @@ namespace Mesen.GUI.Debugger.Integration
{
int prgAddress;
if(_prgAddressByLine.TryGetValue(fileID.ToString() + "_" + lineIndex.ToString(), out prgAddress)) {
return new AddressInfo() { Address = prgAddress, Type = SnesMemoryType.CpuMemory };
return new AddressInfo() { Address = prgAddress, Type = SnesMemoryType.PrgRom };
}
return null;
}
@ -94,7 +94,7 @@ namespace Mesen.GUI.Debugger.Integration
public SourceCodeLocation GetSourceCodeLineInfo(AddressInfo address)
{
SourceCodeLocation line;
if(address.Type == SnesMemoryType.CpuMemory && _linesByPrgAddress.TryGetValue(address.Address, out line)) {
if(address.Type == SnesMemoryType.PrgRom && _linesByPrgAddress.TryGetValue(address.Address, out line)) {
return line;
}
return null;