Fixed segfault when accessing RIOT IO registers, any of its mirrors,

and associated labels in the debugger prompt.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2022 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-04-23 19:25:11 +00:00
parent f67c3b7690
commit 66690033c4
1 changed files with 10 additions and 1 deletions

View File

@ -372,7 +372,16 @@ const string& CartDebug::getLabel(uInt16 addr, bool isRead, int places) const
(isRead ? ourTIAMnemonicR[addr&0x0f] : ourTIAMnemonicW[addr&0x3f]);
case ADDR_RIOT:
return result = ourIOMnemonic[(addr&0xf00)-280];
{
uInt16 idx = (addr&0xff) - 0x80;
if(idx < 24)
return result = ourIOMnemonic[idx];
else
{
places = 3; // fall through to calculate actual address
break;
}
}
case ADDR_RAM:
case ADDR_ROM: