diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 95f0de615..18dbcf956 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -72,6 +72,8 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem) myOSystem.settings().getInt("gfxformat") == 16 ? kBASE_16 : kBASE_2; DiStella::settings.show_addresses = myOSystem.settings().getBool("showaddr"); + DiStella::settings.fflag = true; // Not currently configurable + DiStella::settings.rflag = false; // Not currently configurable } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/DiStella.cxx b/src/debugger/DiStella.cxx index fd490791b..01e57641a 100644 --- a/src/debugger/DiStella.cxx +++ b/src/debugger/DiStella.cxx @@ -458,7 +458,7 @@ void DiStella::disasm(uInt32 distart, int pass) } else if (pass == 3) { - if (ad < 0x100) + if (ad < 0x100 && settings.fflag) nextline << ".w "; else nextline << " "; @@ -473,7 +473,7 @@ void DiStella::disasm(uInt32 distart, int pass) nextline << CartDebug::ourIOMnemonic[ad-0x280]; nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8); } - else if (labfound == 4) + else if (labfound == 4 && settings.rflag) { int tmp = (ad & myAppData.end)+myOffset; USER_OR_AUTO_LABEL("", tmp, ""); @@ -530,7 +530,7 @@ void DiStella::disasm(uInt32 distart, int pass) } else if (pass == 3) { - if (ad < 0x100) + if (ad < 0x100 && settings.fflag) nextline << ".wx "; else nextline << " "; @@ -545,7 +545,7 @@ void DiStella::disasm(uInt32 distart, int pass) nextline << CartDebug::ourIOMnemonic[ad-0x280] << ",X"; nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8); } - else if (labfound == 4) + else if (labfound == 4 && settings.rflag) { int tmp = (ad & myAppData.end)+myOffset; USER_OR_AUTO_LABEL("", tmp, ",X"); @@ -574,7 +574,7 @@ void DiStella::disasm(uInt32 distart, int pass) } else if (pass == 3) { - if (ad < 0x100) + if (ad < 0x100 && settings.fflag) nextline << ".wy "; else nextline << " "; @@ -589,7 +589,7 @@ void DiStella::disasm(uInt32 distart, int pass) nextline << CartDebug::ourIOMnemonic[ad-0x280] << ",Y"; nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8); } - else if (labfound == 4) + else if (labfound == 4 && settings.rflag) { int tmp = (ad & myAppData.end)+myOffset; USER_OR_AUTO_LABEL("", tmp, ",Y"); @@ -705,7 +705,7 @@ void DiStella::disasm(uInt32 distart, int pass) } else if (pass == 3) { - if (ad < 0x100) + if (ad < 0x100 && settings.fflag) nextline << ".ind "; else nextline << " "; diff --git a/src/debugger/DiStella.hxx b/src/debugger/DiStella.hxx index 2cf5579c0..fd752c05e 100644 --- a/src/debugger/DiStella.hxx +++ b/src/debugger/DiStella.hxx @@ -66,6 +66,8 @@ class DiStella typedef struct { BaseFormat gfx_format; bool show_addresses; + bool fflag; // Forces correct address length (-f in Distella) + bool rflag; // Relocate calls out of address range (-r in Distella) } Settings; static Settings settings;