Debugger: Fixed source view mode regressions
This commit is contained in:
parent
e9e88da0cb
commit
9b27cc109e
2 changed files with 3 additions and 3 deletions
|
@ -483,7 +483,7 @@ AddressInfo Debugger::GetRelativeAddress(AddressInfo absAddress, CpuType cpuType
|
||||||
if(absAddress.Type == SnesMemoryType::WorkRam) {
|
if(absAddress.Type == SnesMemoryType::WorkRam) {
|
||||||
startBank = 0x7E;
|
startBank = 0x7E;
|
||||||
} else {
|
} else {
|
||||||
startBank = (_cpu->GetState().K & 0xC0) << 4;
|
startBank = _cpu->GetState().K & 0xC0;
|
||||||
}
|
}
|
||||||
} else if(cpuType == CpuType::Sa1) {
|
} else if(cpuType == CpuType::Sa1) {
|
||||||
startBank = (_cart->GetSa1()->GetCpuState().K & 0xC0);
|
startBank = (_cart->GetSa1()->GetCpuState().K & 0xC0);
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace Mesen.GUI.Debugger.Integration
|
||||||
{
|
{
|
||||||
int prgAddress;
|
int prgAddress;
|
||||||
if(_prgAddressByLine.TryGetValue(fileID.ToString() + "_" + lineIndex.ToString(), out 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;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ namespace Mesen.GUI.Debugger.Integration
|
||||||
public SourceCodeLocation GetSourceCodeLineInfo(AddressInfo address)
|
public SourceCodeLocation GetSourceCodeLineInfo(AddressInfo address)
|
||||||
{
|
{
|
||||||
SourceCodeLocation line;
|
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 line;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue