mirror of https://github.com/stella-emu/stella.git
fixes #244 (wrong source address display for cleared peeks)
This commit is contained in:
parent
4050acad01
commit
c6a5b96796
|
@ -120,6 +120,12 @@ void DiStella::disasm(uInt32 distart, int pass)
|
|||
myPC = distart - myOffset;
|
||||
while (myPC <= myAppData.end) {
|
||||
|
||||
// since -1 is used in m6502.m4 for clearing the last peek
|
||||
// and this results into an access at e.g. 0xffff,
|
||||
// we have to fix the consequences here (ugly!).
|
||||
if(myPC == myAppData.end)
|
||||
goto FIX_LAST;
|
||||
|
||||
if (checkBits(myPC, CartDebug::GFX | CartDebug::PGFX,
|
||||
CartDebug::CODE)) {
|
||||
if (pass == 2)
|
||||
|
@ -137,6 +143,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
|||
myPC++;
|
||||
} else if (checkBits(myPC, CartDebug::ROW,
|
||||
CartDebug::CODE | CartDebug::DATA | CartDebug::GFX | CartDebug::PGFX)) {
|
||||
FIX_LAST:
|
||||
if (pass == 2)
|
||||
mark(myPC + myOffset, CartDebug::VALID_ENTRY);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#ifndef CLEAR_LAST_PEEK
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
#define CLEAR_LAST_PEEK(_addr) _addr = 0;
|
||||
#define CLEAR_LAST_PEEK(_addr) _addr = -1;
|
||||
#else
|
||||
#define CLEAR_LAST_PEEK(_addr)
|
||||
#endif
|
||||
|
@ -428,7 +428,7 @@ case 0x7d:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -700,7 +700,7 @@ case 0x3d:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -1232,7 +1232,7 @@ case 0xdd:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -1700,7 +1700,7 @@ case 0x5d:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -2416,7 +2416,7 @@ case 0xbd:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -2646,7 +2646,7 @@ case 0xbc:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -2853,7 +2853,7 @@ case 0xfc:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -2930,7 +2930,7 @@ case 0x1d:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
@ -3976,7 +3976,7 @@ case 0xfd:
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#ifndef CLEAR_LAST_PEEK
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
#define CLEAR_LAST_PEEK(_addr) _addr = 0;
|
||||
#define CLEAR_LAST_PEEK(_addr) _addr = -1;
|
||||
#else
|
||||
#define CLEAR_LAST_PEEK(_addr)
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ define(M6502_ABSOLUTEX_READ, `{
|
|||
operand = peek(intermediateAddress, DISASM_NONE);
|
||||
intermediateAddress = (high | low) + X;
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operand = peek(intermediateAddress, DISASM_DATA);
|
||||
|
|
Loading…
Reference in New Issue