Fixed DASH bug when changing banks; the debugger didn't recognize the change,

and hence didn't re-disassemble.

Fixed long-standing bug in the debugger disassembly; addresses marked as $F000
(or equivalent) were never being highlighted in the disassembly view.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2967 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-07-31 15:54:14 +00:00
parent cced0aef33
commit af254b3d85
5 changed files with 16 additions and 17 deletions

View File

@ -18,6 +18,9 @@
with certain bankswitch types. The bankswitch UI should now be used
to query/set bank state.
* Fixed bug in disassembly output; instructions at $F000 were never
being highlighted during execution.
* The UNIX configure script now supports newer versions of Hurd.
Special thanks to Stephen Kitt for the patch.

View File

@ -316,8 +316,8 @@ bool CartDebug::fillDisassemblyList(BankInfo& info, uInt16 search)
const DisassemblyTag& tag = myDisassembly.list[i];
const uInt16 address = tag.address & 0xFFF;
// Addresses marked as 'ROW' normally won't have an address
if(address)
// Exclude 'ROW'; they don't have a valid address
if(tag.type != CartDebug::ROW)
{
// Create a mapping from addresses to line numbers
myAddrToLineList.insert(make_pair(address, i));

View File

@ -142,7 +142,7 @@ void CartridgeDASHWidget::loadConfig()
void CartridgeDASHWidget::handleCommand(CommandSender* sender,
int cmd, int data, int id)
{
// uInt8 bank = 0x00;
uInt8 bank = 0x00;
switch(cmd)
{

View File

@ -323,8 +323,7 @@ bool Cartridge::save(ofstream& out)
return false;
}
for(int i=0; i<size; i++)
out << image[i];
out.write((const char*)image, size);
return true;
}

View File

@ -143,8 +143,6 @@ uInt8 CartridgeDASH::peek(uInt16 address) {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeDASH::poke(uInt16 address, uInt8 value) {
bool myBankChanged = false;
// Check for write to the bank switch address. RAM/ROM and bank # are encoded in 'value'
// There are NO mirrored hotspots.
@ -174,9 +172,9 @@ bool CartridgeDASH::bankRAM(uInt8 bank) {
bankRAMSlot(bank | BITMASK_ROMRAM | BITMASK_LOWERUPPER);
// Remember that this hotspot was accessed for RAM
uInt8 bankNumber = (bank >> BANK_BITS) & 3;
segmentInUse[bankNumber] = bank | BITMASK_ROMRAM;
segmentInUse[(bank >> BANK_BITS) & 3] = bank | BITMASK_ROMRAM;
#if 0
cerr << "\nBANK CONTENTS: -------------------------------------\n";
for (uInt32 b = 0; b < 8; b++)
{
@ -194,7 +192,7 @@ bool CartridgeDASH::bankRAM(uInt8 bank) {
}
}
cerr << "----------------------------------------------------\n\n";
#endif
return true;
@ -210,7 +208,6 @@ void CartridgeDASH::bankRAMSlot(uInt16 bank) {
bool upper = bank & BITMASK_LOWERUPPER; // is this the read or write port
uInt32 startCurrentBank = currentBank << RAM_BANK_TO_POWER; // Effectively * 512 bytes
uInt32 blockSize = 1 << shift;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
@ -230,7 +227,7 @@ void CartridgeDASH::bankRAMSlot(uInt16 bank) {
uInt32 start = 0x1000 + (bankNumber << RAM_BANK_TO_POWER) + (upper ? RAM_WRITE_OFFSET : 0);
uInt32 end = start + RAM_BANK_SIZE - 1;
for (uInt32 address = start; address <= end; address += blockSize) {
for (uInt32 address = start; address <= end; address += (1 << shift)) {
if(upper)
access.directPokeBase = &myRAM[startCurrentBank + (address & (RAM_BANK_SIZE - 1))];
else
@ -254,10 +251,10 @@ bool CartridgeDASH::bankROM(uInt8 bank) {
bankROMSlot(bank | BITMASK_LOWERUPPER);
// Remember that this hotspot was accessed for ROM
uInt8 bankNumber = (bank >> BANK_BITS) & 3;
segmentInUse[bankNumber] = bank;
segmentInUse[(bank >> BANK_BITS) & 3] = bank;
#if 0
cerr << "\nBANK CONTENTS: -------------------------------------\n";
for (uInt32 b = 0; b < 8; b++)
{
@ -275,7 +272,7 @@ bool CartridgeDASH::bankROM(uInt8 bank) {
}
}
cerr << "----------------------------------------------------\n\n";
#endif
return true;