Fixed infinite loop in Distella; a section of code needed to use 32-bit

values instead of 16-bit.

Fixed compilation of System class and M6502 disassembly tracking when
compiling without debugger support.  In this case, the tracking is not
done, and all related operations are completely #ifdef'ed out (resulting
in no extra speed/memory usage at all).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2152 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-10-11 23:06:37 +00:00
parent 82bae93337
commit e8c91c7876
4 changed files with 40 additions and 15 deletions

View File

@ -919,13 +919,12 @@ DONE_WITH_ADD:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DiStella::processDirectives(const CartDebug::DirectiveList& directives) void DiStella::processDirectives(const CartDebug::DirectiveList& directives)
{ {
for(CartDebug::DirectiveList::const_iterator i = directives.begin(); for(CartDebug::DirectiveList::const_iterator i = directives.begin();
i != directives.end(); ++i) i != directives.end(); ++i)
{ {
const CartDebug::DirectiveTag tag = *i; const CartDebug::DirectiveTag tag = *i;
if(check_range(tag.start, tag.end)) if(check_range(tag.start, tag.end))
for(uInt16 k = tag.start; k <= tag.end; ++k) for(uInt32 k = tag.start; k <= tag.end; ++k)
mark(k, tag.type); mark(k, tag.type);
} }
} }

View File

@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of // See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: M6502.m4 2150 2010-10-11 14:51:48Z stephena $ // $Id: M6502.m4 2151 2010-10-11 15:11:10Z stephena $
//============================================================================ //============================================================================
/** /**
@ -24,7 +24,7 @@
'm4 M6502.m4 > M6502.ins' 'm4 M6502.m4 > M6502.ins'
@author Bradford W. Mott @author Bradford W. Mott
@version $Id: M6502.m4 2150 2010-10-11 14:51:48Z stephena $ @version $Id: M6502.m4 2151 2010-10-11 15:11:10Z stephena $
*/ */
#ifndef NOTSAMEPAGE #ifndef NOTSAMEPAGE
@ -32,17 +32,29 @@
#endif #endif
#ifndef SET_LAST_PEEK #ifndef SET_LAST_PEEK
#define SET_LAST_PEEK(_addr) _addr = intermediateAddress; #ifdef DEBUGGER_SUPPORT
#define SET_LAST_PEEK(_addr) _addr = intermediateAddress;
#else
#define SET_LAST_PEEK(_addr)
#endif
#endif #endif
#ifndef CLEAR_LAST_PEEK #ifndef CLEAR_LAST_PEEK
#define CLEAR_LAST_PEEK(_addr) _addr = 0; #ifdef DEBUGGER_SUPPORT
#define CLEAR_LAST_PEEK(_addr) _addr = 0;
#else
#define CLEAR_LAST_PEEK(_addr)
#endif
#endif #endif
#ifndef CHECK_GFX_WRITE #ifndef CHECK_GFX_WRITE
#define CHECK_GFX_WRITE(_addr) \ #ifdef DEBUGGER_SUPPORT
if((operandAddress == 0x1B || operandAddress == 0x1C) && _addr) \ #define CHECK_GFX_WRITE(_addr) \
mySystem->setAddressDisasmType(_addr, DISASM_GFX); if((operandAddress == 0x1B || operandAddress == 0x1C) && _addr) \
mySystem->setAddressDisasmType(_addr, DISASM_GFX);
#else
#define CHECK_GFX_WRITE(_addr)
#endif
#endif #endif

View File

@ -32,17 +32,29 @@
#endif #endif
#ifndef SET_LAST_PEEK #ifndef SET_LAST_PEEK
#define SET_LAST_PEEK(_addr) _addr = intermediateAddress; #ifdef DEBUGGER_SUPPORT
#define SET_LAST_PEEK(_addr) _addr = intermediateAddress;
#else
#define SET_LAST_PEEK(_addr)
#endif
#endif #endif
#ifndef CLEAR_LAST_PEEK #ifndef CLEAR_LAST_PEEK
#define CLEAR_LAST_PEEK(_addr) _addr = 0; #ifdef DEBUGGER_SUPPORT
#define CLEAR_LAST_PEEK(_addr) _addr = 0;
#else
#define CLEAR_LAST_PEEK(_addr)
#endif
#endif #endif
#ifndef CHECK_GFX_WRITE #ifndef CHECK_GFX_WRITE
#define CHECK_GFX_WRITE(_addr) \ #ifdef DEBUGGER_SUPPORT
if((operandAddress == 0x1B || operandAddress == 0x1C) && _addr) \ #define CHECK_GFX_WRITE(_addr) \
mySystem->setAddressDisasmType(_addr, DISASM_GFX); if((operandAddress == 0x1B || operandAddress == 0x1C) && _addr) \
mySystem->setAddressDisasmType(_addr, DISASM_GFX);
#else
#define CHECK_GFX_WRITE(_addr)
#endif
#endif #endif

View File

@ -19,7 +19,7 @@
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#include "Debugger.hxx"
#include "Device.hxx" #include "Device.hxx"
#include "M6502.hxx" #include "M6502.hxx"
#include "M6532.hxx" #include "M6532.hxx"
@ -216,9 +216,11 @@ uInt8 System::peek(uInt16 addr, uInt8 flags)
{ {
PageAccess& access = myPageAccessTable[(addr & myAddressMask) >> myPageShift]; PageAccess& access = myPageAccessTable[(addr & myAddressMask) >> myPageShift];
#ifdef DEBUGGER_SUPPORT
// Set access type // Set access type
if(access.codeAccessBase) if(access.codeAccessBase)
*(access.codeAccessBase + (addr & myPageMask)) |= flags; *(access.codeAccessBase + (addr & myPageMask)) |= flags;
#endif
// See if this page uses direct accessing or not // See if this page uses direct accessing or not
uInt8 result; uInt8 result;