The built-in Distella was assuming the 'r' flag (-r on commandline)

option was set, which normally isn't when disassembling standalone
ROMs.  As such, the disassembly didn't match standard Distella output.
The 'fflag' and 'rflag' options from Distella have therefore been
integrated, but they're not configurable at this point (hardcoded
to true and false, respectively).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2502 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2012-05-27 13:07:38 +00:00
parent 4750c64a17
commit 8f65771872
3 changed files with 11 additions and 7 deletions

View File

@ -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
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -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 << " ";

View File

@ -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;