mirror of https://github.com/stella-emu/stella.git
Fix DiStella trying to process the same PC address repeatedly (fixes #188).
This commit is contained in:
parent
55111c4ccb
commit
193da6c845
|
@ -23,6 +23,9 @@
|
||||||
then back again would pass a 'Tab' key event to the app, which in
|
then back again would pass a 'Tab' key event to the app, which in
|
||||||
most cases would navigate to the next UI element.
|
most cases would navigate to the next UI element.
|
||||||
|
|
||||||
|
* Fixed possible lockups when entering the debugger under certain
|
||||||
|
circumstances.
|
||||||
|
|
||||||
* Reverted joystick changes for Decathlon ROMs from last release, as
|
* Reverted joystick changes for Decathlon ROMs from last release, as
|
||||||
it was added by mistake.
|
it was added by mistake.
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,16 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
// use all access points determined by Stella during emulation
|
// use all access points determined by Stella during emulation
|
||||||
int codeAccessPoint = 0;
|
int codeAccessPoint = 0;
|
||||||
|
|
||||||
while(!myAddressQueue.empty())
|
// Sometimes we get a circular reference, in that processing a certain
|
||||||
|
// PC address leads us to a sequence of addresses that end up trying
|
||||||
|
// to process the same address again. We detect such consecutive PC
|
||||||
|
// addresses and only process the first one
|
||||||
|
uInt16 lastPC = 0;
|
||||||
|
bool duplicateFound = false;
|
||||||
|
while(!(myAddressQueue.empty() || duplicateFound))
|
||||||
{
|
{
|
||||||
myPC = myAddressQueue.front();
|
myPC = lastPC = myAddressQueue.front();
|
||||||
|
|
||||||
uInt16 pcBeg = myPC;
|
uInt16 pcBeg = myPC;
|
||||||
myAddressQueue.pop();
|
myAddressQueue.pop();
|
||||||
disasm(myPC, 1);
|
disasm(myPC, 1);
|
||||||
|
@ -174,6 +181,7 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
++codeAccessPoint;
|
++codeAccessPoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
duplicateFound = (myAddressQueue.front() == lastPC);
|
||||||
}
|
}
|
||||||
for (int k = 0; k <= myAppData.end; k++)
|
for (int k = 0; k <= myAppData.end; k++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue