Fixed crash with disasm command in debugger.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2698 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-04-17 23:11:32 +00:00
parent a6bec42db7
commit df77cc8997
2 changed files with 11 additions and 2 deletions

View File

@ -335,8 +335,18 @@ int CartDebug::addressToLine(uInt16 address) const
string CartDebug::disassemble(uInt16 start, uInt16 lines) const
{
Disassembly disasm;
BankInfo info;
info.addressList.push_back(start);
if(start & 0x1000)
{
int banksize = 0;
myConsole.cartridge().getImage(banksize);
info.size = BSPF_min(banksize, 4096);
}
else
info.size = 128;
DiStella distella(*this, disasm.list, info, DiStella::settings,
(uInt8*)myDisLabels, (uInt8*)myDisDirectives,
(ReservedEquates&)myReserved, false);

View File

@ -90,10 +90,9 @@ void CartridgeDPC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
// Set the page accessing method for the DPC reading & writing pages
access.type = System::PA_READWRITE;
for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift))
mySystem->setPageAccess(j >> shift, access);