two minor fixes for multi-segment ROM disassemblies

This commit is contained in:
Thomas Jentzsch 2022-05-05 12:28:47 +02:00
parent 73ffb66b3d
commit e13233e5b7
2 changed files with 8 additions and 6 deletions

View File

@ -271,9 +271,8 @@ void DiStella::disasm(uInt32 distart, int pass)
/* Line information is already printed; append .byte since last
instruction will put recompilable object larger that original
binary file */
myDisasmBuf << ".byte $" << Base::HEX2 << static_cast<int>(opcode) << " $"
<< Base::HEX4 << myPC + myOffset << "'"
<< Base::HEX2 << static_cast<int>(opcode);
myDisasmBuf << ".byte $" << Base::HEX2 << static_cast<int>(opcode)
<< " ;" << ourLookup[opcode].mnemonic;
addEntry(Device::DATA);
if(myPC == myAppData.end) {
@ -283,9 +282,7 @@ void DiStella::disasm(uInt32 distart, int pass)
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '";
opcode = Debugger::debugger().peek(myPC + myOffset); ++myPC;
myDisasmBuf << ".byte $" << Base::HEX2 << static_cast<int>(opcode) << " $"
<< Base::HEX4 << myPC + myOffset << "'"
<< Base::HEX2 << static_cast<int>(opcode);
myDisasmBuf << ".byte $" << Base::HEX2 << static_cast<int>(opcode);
addEntry(Device::DATA);
}
}

View File

@ -115,6 +115,11 @@ class CartridgeE7 : public Cartridge
*/
uInt16 romBankCount() const override;
/**
Get the number of segments supported by the cartridge.
*/
uInt16 segmentCount() const override { return NUM_SEGMENTS; }
/**
Patch the cartridge ROM.