mirror of https://github.com/stella-emu/stella.git
More 'enum class' conversions.
This commit is contained in:
parent
535fffdc46
commit
4d99772a10
|
@ -523,8 +523,8 @@ bool CartDebug::addLabel(const string& label, uInt16 address)
|
||||||
// Only user-defined labels can be added or redefined
|
// Only user-defined labels can be added or redefined
|
||||||
switch(addressType(address))
|
switch(addressType(address))
|
||||||
{
|
{
|
||||||
case ADDR_TIA:
|
case AddrType::TIA:
|
||||||
case ADDR_IO:
|
case AddrType::IO:
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
removeLabel(label);
|
removeLabel(label);
|
||||||
|
@ -562,7 +562,7 @@ bool CartDebug::getLabel(ostream& buf, uInt16 addr, bool isRead, int places) con
|
||||||
{
|
{
|
||||||
switch(addressType(addr))
|
switch(addressType(addr))
|
||||||
{
|
{
|
||||||
case ADDR_TIA:
|
case AddrType::TIA:
|
||||||
{
|
{
|
||||||
if(isRead)
|
if(isRead)
|
||||||
{
|
{
|
||||||
|
@ -591,7 +591,7 @@ bool CartDebug::getLabel(ostream& buf, uInt16 addr, bool isRead, int places) con
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ADDR_IO:
|
case AddrType::IO:
|
||||||
{
|
{
|
||||||
uInt16 a = addr & 0xFF, offset = addr & 0xFD00;
|
uInt16 a = addr & 0xFF, offset = addr & 0xFD00;
|
||||||
if(a <= 0x97)
|
if(a <= 0x97)
|
||||||
|
@ -611,7 +611,7 @@ bool CartDebug::getLabel(ostream& buf, uInt16 addr, bool isRead, int places) con
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ADDR_ZPRAM:
|
case AddrType::ZPRAM:
|
||||||
{
|
{
|
||||||
// RAM can use user-defined labels; otherwise we default to
|
// RAM can use user-defined labels; otherwise we default to
|
||||||
// standard mnemonics
|
// standard mnemonics
|
||||||
|
@ -634,7 +634,7 @@ bool CartDebug::getLabel(ostream& buf, uInt16 addr, bool isRead, int places) con
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ADDR_ROM:
|
case AddrType::ROM:
|
||||||
{
|
{
|
||||||
// These addresses can never be in the system labels list
|
// These addresses can never be in the system labels list
|
||||||
const auto& iter = myUserLabels.find(addr);
|
const auto& iter = myUserLabels.find(addr);
|
||||||
|
@ -1317,21 +1317,21 @@ CartDebug::AddrType CartDebug::addressType(uInt16 addr) const
|
||||||
if(addr % 0x2000 < 0x1000)
|
if(addr % 0x2000 < 0x1000)
|
||||||
{
|
{
|
||||||
if((addr & 0x00ff) < 0x80)
|
if((addr & 0x00ff) < 0x80)
|
||||||
return ADDR_TIA;
|
return AddrType::TIA;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch(addr & 0x0f00)
|
switch(addr & 0x0f00)
|
||||||
{
|
{
|
||||||
case 0x000: case 0x100: case 0x400: case 0x500:
|
case 0x000: case 0x100: case 0x400: case 0x500:
|
||||||
case 0x800: case 0x900: case 0xc00: case 0xd00:
|
case 0x800: case 0x900: case 0xc00: case 0xd00:
|
||||||
return ADDR_ZPRAM;
|
return AddrType::ZPRAM;
|
||||||
case 0x200: case 0x300: case 0x600: case 0x700:
|
case 0x200: case 0x300: case 0x600: case 0x700:
|
||||||
case 0xa00: case 0xb00: case 0xe00: case 0xf00:
|
case 0xa00: case 0xb00: case 0xe00: case 0xf00:
|
||||||
return ADDR_IO;
|
return AddrType::IO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ADDR_ROM;
|
return AddrType::ROM;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -47,7 +47,7 @@ class CartDebug : public DebuggerSystem
|
||||||
friend class DiStella;
|
friend class DiStella;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum DisasmType {
|
enum DisasmType { // TODO - make this 'enum class'
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
REFERENCED = 1 << 0, /* 0x01, code somewhere in the program references it,
|
REFERENCED = 1 << 0, /* 0x01, code somewhere in the program references it,
|
||||||
i.e. LDA $F372 referenced $F372 */
|
i.e. LDA $F372 referenced $F372 */
|
||||||
|
@ -86,12 +86,7 @@ class CartDebug : public DebuggerSystem
|
||||||
};
|
};
|
||||||
|
|
||||||
// Determine 'type' of address (ie, what part of the system accessed)
|
// Determine 'type' of address (ie, what part of the system accessed)
|
||||||
enum AddrType {
|
enum class AddrType { TIA, IO, ZPRAM, ROM };
|
||||||
ADDR_TIA,
|
|
||||||
ADDR_IO,
|
|
||||||
ADDR_ZPRAM,
|
|
||||||
ADDR_ROM
|
|
||||||
};
|
|
||||||
AddrType addressType(uInt16 addr) const;
|
AddrType addressType(uInt16 addr) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -110,7 +110,7 @@ string DebuggerParser::run(const string& command)
|
||||||
getArgs(command, verb);
|
getArgs(command, verb);
|
||||||
commandResult.str("");
|
commandResult.str("");
|
||||||
|
|
||||||
for(int i = 0; i < kNumCommands; ++i)
|
for(uInt32 i = 0; i < NumCommands; ++i)
|
||||||
{
|
{
|
||||||
if(BSPF::equalsIgnoreCase(verb, commands[i].cmdString))
|
if(BSPF::equalsIgnoreCase(verb, commands[i].cmdString))
|
||||||
{
|
{
|
||||||
|
@ -177,7 +177,7 @@ void DebuggerParser::outputCommandError(const string& errorMsg, int command)
|
||||||
void DebuggerParser::getCompletions(const char* in, StringList& completions) const
|
void DebuggerParser::getCompletions(const char* in, StringList& completions) const
|
||||||
{
|
{
|
||||||
// cerr << "Attempting to complete \"" << in << "\"" << endl;
|
// cerr << "Attempting to complete \"" << in << "\"" << endl;
|
||||||
for(int i = 0; i < kNumCommands; ++i)
|
for(uInt32 i = 0; i < NumCommands; ++i)
|
||||||
{
|
{
|
||||||
if(BSPF::matches(commands[i].cmdString, in))
|
if(BSPF::matches(commands[i].cmdString, in))
|
||||||
completions.push_back(commands[i].cmdString);
|
completions.push_back(commands[i].cmdString);
|
||||||
|
@ -332,7 +332,8 @@ string DebuggerParser::showWatches()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool DebuggerParser::getArgs(const string& command, string& verb)
|
bool DebuggerParser::getArgs(const string& command, string& verb)
|
||||||
{
|
{
|
||||||
int state = kIN_COMMAND, i = 0, length = int(command.length());
|
ParseState state = ParseState::IN_COMMAND;
|
||||||
|
uInt32 i = 0, length = uInt32(command.length());
|
||||||
string curArg = "";
|
string curArg = "";
|
||||||
verb = "";
|
verb = "";
|
||||||
|
|
||||||
|
@ -348,23 +349,23 @@ bool DebuggerParser::getArgs(const string& command, string& verb)
|
||||||
char c = command[i++];
|
char c = command[i++];
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case kIN_COMMAND:
|
case ParseState::IN_COMMAND:
|
||||||
if(c == ' ')
|
if(c == ' ')
|
||||||
state = kIN_SPACE;
|
state = ParseState::IN_SPACE;
|
||||||
else
|
else
|
||||||
verb += c;
|
verb += c;
|
||||||
break;
|
break;
|
||||||
case kIN_SPACE:
|
case ParseState::IN_SPACE:
|
||||||
if(c == '{')
|
if(c == '{')
|
||||||
state = kIN_BRACE;
|
state = ParseState::IN_BRACE;
|
||||||
else if(c != ' ') {
|
else if(c != ' ') {
|
||||||
state = kIN_ARG;
|
state = ParseState::IN_ARG;
|
||||||
curArg += c;
|
curArg += c;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kIN_BRACE:
|
case ParseState::IN_BRACE:
|
||||||
if(c == '}') {
|
if(c == '}') {
|
||||||
state = kIN_SPACE;
|
state = ParseState::IN_SPACE;
|
||||||
argStrings.push_back(curArg);
|
argStrings.push_back(curArg);
|
||||||
// cerr << "{" << curArg << "}" << endl;
|
// cerr << "{" << curArg << "}" << endl;
|
||||||
curArg = "";
|
curArg = "";
|
||||||
|
@ -372,9 +373,9 @@ bool DebuggerParser::getArgs(const string& command, string& verb)
|
||||||
curArg += c;
|
curArg += c;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kIN_ARG:
|
case ParseState::IN_ARG:
|
||||||
if(c == ' ') {
|
if(c == ' ') {
|
||||||
state = kIN_SPACE;
|
state = ParseState::IN_SPACE;
|
||||||
argStrings.push_back(curArg);
|
argStrings.push_back(curArg);
|
||||||
curArg = "";
|
curArg = "";
|
||||||
} else {
|
} else {
|
||||||
|
@ -410,7 +411,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
{
|
{
|
||||||
// cerr << "entering validateArgs(" << cmd << ")" << endl;
|
// cerr << "entering validateArgs(" << cmd << ")" << endl;
|
||||||
bool required = commands[cmd].parmsRequired;
|
bool required = commands[cmd].parmsRequired;
|
||||||
parameters* p = commands[cmd].parms;
|
Parameters* p = commands[cmd].parms;
|
||||||
|
|
||||||
if(argCount == 0)
|
if(argCount == 0)
|
||||||
{
|
{
|
||||||
|
@ -426,7 +427,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
|
|
||||||
// Figure out how many arguments are required by the command
|
// Figure out how many arguments are required by the command
|
||||||
uInt32 count = 0, argRequiredCount = 0;
|
uInt32 count = 0, argRequiredCount = 0;
|
||||||
while(*p != kARG_END_ARGS && *p != kARG_MULTI_BYTE)
|
while(*p != Parameters::ARG_END_ARGS && *p != Parameters::ARG_MULTI_BYTE)
|
||||||
{
|
{
|
||||||
++count;
|
++count;
|
||||||
++p;
|
++p;
|
||||||
|
@ -434,7 +435,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
|
|
||||||
// Evil hack: some commands intentionally take multiple arguments
|
// Evil hack: some commands intentionally take multiple arguments
|
||||||
// In this case, the required number of arguments is unbounded
|
// In this case, the required number of arguments is unbounded
|
||||||
argRequiredCount = (*p == kARG_END_ARGS) ? count : argCount;
|
argRequiredCount = (*p == Parameters::ARG_END_ARGS) ? count : argCount;
|
||||||
|
|
||||||
p = commands[cmd].parms;
|
p = commands[cmd].parms;
|
||||||
uInt32 curCount = 0;
|
uInt32 curCount = 0;
|
||||||
|
@ -448,7 +449,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
|
|
||||||
switch(*p)
|
switch(*p)
|
||||||
{
|
{
|
||||||
case kARG_DWORD:
|
case Parameters::ARG_DWORD:
|
||||||
#if 0 // TODO - do we need error checking at all here?
|
#if 0 // TODO - do we need error checking at all here?
|
||||||
if(curArgInt > 0xffffffff)
|
if(curArgInt > 0xffffffff)
|
||||||
{
|
{
|
||||||
|
@ -458,7 +459,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kARG_WORD:
|
case Parameters::ARG_WORD:
|
||||||
if(curArgInt > 0xffff)
|
if(curArgInt > 0xffff)
|
||||||
{
|
{
|
||||||
commandResult.str(red("invalid word argument (must be 0-$ffff)"));
|
commandResult.str(red("invalid word argument (must be 0-$ffff)"));
|
||||||
|
@ -466,7 +467,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kARG_BYTE:
|
case Parameters::ARG_BYTE:
|
||||||
if(curArgInt > 0xff)
|
if(curArgInt > 0xff)
|
||||||
{
|
{
|
||||||
commandResult.str(red("invalid byte argument (must be 0-$ff)"));
|
commandResult.str(red("invalid byte argument (must be 0-$ff)"));
|
||||||
|
@ -474,7 +475,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kARG_BOOL:
|
case Parameters::ARG_BOOL:
|
||||||
if(curArgInt != 0 && curArgInt != 1)
|
if(curArgInt != 0 && curArgInt != 1)
|
||||||
{
|
{
|
||||||
commandResult.str(red("invalid boolean argument (must be 0 or 1)"));
|
commandResult.str(red("invalid boolean argument (must be 0 or 1)"));
|
||||||
|
@ -482,7 +483,7 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kARG_BASE_SPCL:
|
case Parameters::ARG_BASE_SPCL:
|
||||||
if(curArgInt != 2 && curArgInt != 10 && curArgInt != 16
|
if(curArgInt != 2 && curArgInt != 10 && curArgInt != 16
|
||||||
&& curArgStr != "hex" && curArgStr != "dec" && curArgStr != "bin")
|
&& curArgStr != "hex" && curArgStr != "dec" && curArgStr != "bin")
|
||||||
{
|
{
|
||||||
|
@ -491,21 +492,21 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kARG_LABEL:
|
case Parameters::ARG_LABEL:
|
||||||
case kARG_FILE:
|
case Parameters::ARG_FILE:
|
||||||
break; // TODO: validate these (for now any string's allowed)
|
break; // TODO: validate these (for now any string's allowed)
|
||||||
|
|
||||||
case kARG_MULTI_BYTE:
|
case Parameters::ARG_MULTI_BYTE:
|
||||||
case kARG_MULTI_WORD:
|
case Parameters::ARG_MULTI_WORD:
|
||||||
break; // FIXME: validate these (for now, any number's allowed)
|
break; // FIXME: validate these (for now, any number's allowed)
|
||||||
|
|
||||||
case kARG_END_ARGS:
|
case Parameters::ARG_END_ARGS:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++curCount;
|
++curCount;
|
||||||
++p;
|
++p;
|
||||||
|
|
||||||
} while(*p != kARG_END_ARGS && curCount < argRequiredCount);
|
} while(*p != Parameters::ARG_END_ARGS && curCount < argRequiredCount);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
cerr << "curCount = " << curCount << endl
|
cerr << "curCount = " << curCount << endl
|
||||||
|
@ -1240,14 +1241,14 @@ void DebuggerParser::executeHelp()
|
||||||
{
|
{
|
||||||
// Find length of longest command
|
// Find length of longest command
|
||||||
uInt32 clen = 0;
|
uInt32 clen = 0;
|
||||||
for(int i = 0; i < kNumCommands; ++i)
|
for(uInt32 i = 0; i < NumCommands; ++i)
|
||||||
{
|
{
|
||||||
uInt32 len = uInt32(commands[i].cmdString.length());
|
uInt32 len = uInt32(commands[i].cmdString.length());
|
||||||
if(len > clen) clen = len;
|
if(len > clen) clen = len;
|
||||||
}
|
}
|
||||||
|
|
||||||
commandResult << setfill(' ');
|
commandResult << setfill(' ');
|
||||||
for(int i = 0; i < kNumCommands; ++i)
|
for(uInt32 i = 0; i < NumCommands; ++i)
|
||||||
commandResult << setw(clen) << right << commands[i].cmdString
|
commandResult << setw(clen) << right << commands[i].cmdString
|
||||||
<< " - " << commands[i].description << endl;
|
<< " - " << commands[i].description << endl;
|
||||||
|
|
||||||
|
@ -1255,7 +1256,7 @@ void DebuggerParser::executeHelp()
|
||||||
}
|
}
|
||||||
else // get help for specific command
|
else // get help for specific command
|
||||||
{
|
{
|
||||||
for(int i = 0; i < kNumCommands; ++i)
|
for(uInt32 i = 0; i < NumCommands; ++i)
|
||||||
{
|
{
|
||||||
if(argStrings[0] == commands[i].cmdString)
|
if(argStrings[0] == commands[i].cmdString)
|
||||||
{
|
{
|
||||||
|
@ -2040,7 +2041,7 @@ void DebuggerParser::executeTrapRW(uInt32 addr, bool read, bool write, bool add)
|
||||||
{
|
{
|
||||||
switch(debugger.cartDebug().addressType(addr))
|
switch(debugger.cartDebug().addressType(addr))
|
||||||
{
|
{
|
||||||
case CartDebug::ADDR_TIA:
|
case CartDebug::AddrType::TIA:
|
||||||
{
|
{
|
||||||
for(uInt32 i = 0; i <= 0xFFFF; ++i)
|
for(uInt32 i = 0; i <= 0xFFFF; ++i)
|
||||||
{
|
{
|
||||||
|
@ -2055,7 +2056,7 @@ void DebuggerParser::executeTrapRW(uInt32 addr, bool read, bool write, bool add)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CartDebug::ADDR_IO:
|
case CartDebug::AddrType::IO:
|
||||||
{
|
{
|
||||||
for(uInt32 i = 0; i <= 0xFFFF; ++i)
|
for(uInt32 i = 0; i <= 0xFFFF; ++i)
|
||||||
{
|
{
|
||||||
|
@ -2069,7 +2070,7 @@ void DebuggerParser::executeTrapRW(uInt32 addr, bool read, bool write, bool add)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CartDebug::ADDR_ZPRAM:
|
case CartDebug::AddrType::ZPRAM:
|
||||||
{
|
{
|
||||||
for(uInt32 i = 0; i <= 0xFFFF; ++i)
|
for(uInt32 i = 0; i <= 0xFFFF; ++i)
|
||||||
{
|
{
|
||||||
|
@ -2083,7 +2084,7 @@ void DebuggerParser::executeTrapRW(uInt32 addr, bool read, bool write, bool add)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CartDebug::ADDR_ROM:
|
case CartDebug::AddrType::ROM:
|
||||||
{
|
{
|
||||||
if(addr >= 0x1000 && addr <= 0xFFFF)
|
if(addr >= 0x1000 && addr <= 0xFFFF)
|
||||||
{
|
{
|
||||||
|
@ -2220,14 +2221,14 @@ void DebuggerParser::executeZ()
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
// List of all commands available to the parser
|
// List of all commands available to the parser
|
||||||
DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
DebuggerParser::Command DebuggerParser::commands[NumCommands] = {
|
||||||
{
|
{
|
||||||
"a",
|
"a",
|
||||||
"Set Accumulator to <value>",
|
"Set Accumulator to <value>",
|
||||||
"Valid value is 0 - ff\nExample: a ff, a #10",
|
"Valid value is 0 - ff\nExample: a ff, a #10",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeA)
|
std::mem_fn(&DebuggerParser::executeA)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2237,7 +2238,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Base is #2, #10, #16, bin, dec or hex\nExample: base hex",
|
"Base is #2, #10, #16, bin, dec or hex\nExample: base hex",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_BASE_SPCL, kARG_END_ARGS },
|
{ Parameters::ARG_BASE_SPCL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeBase)
|
std::mem_fn(&DebuggerParser::executeBase)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2248,7 +2249,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: break, break f000",
|
"Example: break, break f000",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeBreak)
|
std::mem_fn(&DebuggerParser::executeBreak)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2258,7 +2259,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Condition can include multiple items, see documentation\nExample: breakif _scan>100",
|
"Condition can include multiple items, see documentation\nExample: breakif _scan>100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeBreakif)
|
std::mem_fn(&DebuggerParser::executeBreakif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2268,7 +2269,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: c, c 0, c 1",
|
"Example: c, c 0, c 1",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeC)
|
std::mem_fn(&DebuggerParser::executeC)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2278,7 +2279,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: cheat 0040, cheat abff00",
|
"Example: cheat 0040, cheat abff00",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_LABEL, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeCheat)
|
std::mem_fn(&DebuggerParser::executeCheat)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2288,7 +2289,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: clearbreaks (no parameters)",
|
"Example: clearbreaks (no parameters)",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeClearbreaks)
|
std::mem_fn(&DebuggerParser::executeClearbreaks)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2298,7 +2299,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: clearconfig 0, clearconfig 1",
|
"Example: clearconfig 0, clearconfig 1",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeClearconfig)
|
std::mem_fn(&DebuggerParser::executeClearconfig)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2308,7 +2309,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: clearsavestateifss (no parameters)",
|
"Example: clearsavestateifss (no parameters)",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeClearsavestateifs)
|
std::mem_fn(&DebuggerParser::executeClearsavestateifs)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2318,7 +2319,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"All traps cleared, including any mirrored ones\nExample: cleartraps (no parameters)",
|
"All traps cleared, including any mirrored ones\nExample: cleartraps (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeCleartraps)
|
std::mem_fn(&DebuggerParser::executeCleartraps)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2328,7 +2329,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: clearwatches (no parameters)",
|
"Example: clearwatches (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeClearwatches)
|
std::mem_fn(&DebuggerParser::executeClearwatches)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2338,7 +2339,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Completely clears screen, but keeps history of commands",
|
"Completely clears screen, but keeps history of commands",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeCls)
|
std::mem_fn(&DebuggerParser::executeCls)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2348,7 +2349,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Start and end of range required\nExample: code f000 f010",
|
"Start and end of range required\nExample: code f000 f010",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeCode)
|
std::mem_fn(&DebuggerParser::executeCode)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2358,7 +2359,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Shows a color swatch for the given value\nExample: colortest 1f",
|
"Shows a color swatch for the given value\nExample: colortest 1f",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeColortest)
|
std::mem_fn(&DebuggerParser::executeColortest)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2368,7 +2369,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: d, d 0, d 1",
|
"Example: d, d 0, d 1",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeD)
|
std::mem_fn(&DebuggerParser::executeD)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2378,7 +2379,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Start and end of range required\nExample: data f000 f010",
|
"Start and end of range required\nExample: data f000 f010",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeData)
|
std::mem_fn(&DebuggerParser::executeData)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2388,7 +2389,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: debugcolors (no parameters)",
|
"Example: debugcolors (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDebugColors)
|
std::mem_fn(&DebuggerParser::executeDebugColors)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2398,7 +2399,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: define LABEL1 f100",
|
"Example: define LABEL1 f100",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_LABEL, kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDefine)
|
std::mem_fn(&DebuggerParser::executeDefine)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2408,7 +2409,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: delbreakif 0",
|
"Example: delbreakif 0",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDelbreakif)
|
std::mem_fn(&DebuggerParser::executeDelbreakif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2418,7 +2419,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: delfunction FUNC1",
|
"Example: delfunction FUNC1",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_LABEL, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDelfunction)
|
std::mem_fn(&DebuggerParser::executeDelfunction)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2428,7 +2429,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: delsavestateif 0",
|
"Example: delsavestateif 0",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDelsavestateif)
|
std::mem_fn(&DebuggerParser::executeDelsavestateif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2438,7 +2439,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: deltrap 0",
|
"Example: deltrap 0",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDeltrap)
|
std::mem_fn(&DebuggerParser::executeDeltrap)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2448,7 +2449,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: delwatch 0",
|
"Example: delwatch 0",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeDelwatch)
|
std::mem_fn(&DebuggerParser::executeDelwatch)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2459,7 +2460,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: disasm, disasm f000 100",
|
"Example: disasm, disasm f000 100",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeDisasm)
|
std::mem_fn(&DebuggerParser::executeDisasm)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2472,7 +2473,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
" dump f000 f0ff 7 - dumps all bytes from f000 to f0ff, CPU state and input registers into a file",
|
" dump f000 f0ff 7 - dumps all bytes from f000 to f0ff, CPU state and input registers into a file",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeDump)
|
std::mem_fn(&DebuggerParser::executeDump)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2482,7 +2483,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: exec script.dat, exec auto.txt",
|
"Example: exec script.dat, exec auto.txt",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_FILE, kARG_LABEL, kARG_MULTI_BYTE },
|
{ Parameters::ARG_FILE, Parameters::ARG_LABEL, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeExec)
|
std::mem_fn(&DebuggerParser::executeExec)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2492,7 +2493,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Self-explanatory",
|
"Self-explanatory",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeExitRom)
|
std::mem_fn(&DebuggerParser::executeExitRom)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2502,7 +2503,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: frame, frame 100",
|
"Example: frame, frame 100",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeFrame)
|
std::mem_fn(&DebuggerParser::executeFrame)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2512,7 +2513,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: function FUNC1 { ... }",
|
"Example: function FUNC1 { ... }",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_LABEL, kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeFunction)
|
std::mem_fn(&DebuggerParser::executeFunction)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2522,7 +2523,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Start and end of range required\nExample: gfx f000 f010",
|
"Start and end of range required\nExample: gfx f000 f010",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeGfx)
|
std::mem_fn(&DebuggerParser::executeGfx)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2533,7 +2534,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: help, help code",
|
"Example: help, help code",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_LABEL, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeHelp)
|
std::mem_fn(&DebuggerParser::executeHelp)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2543,7 +2544,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy0up 0",
|
"Example: joy0up 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy0Up)
|
std::mem_fn(&DebuggerParser::executeJoy0Up)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2553,7 +2554,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy0down 0",
|
"Example: joy0down 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy0Down)
|
std::mem_fn(&DebuggerParser::executeJoy0Down)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2563,7 +2564,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy0left 0",
|
"Example: joy0left 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy0Left)
|
std::mem_fn(&DebuggerParser::executeJoy0Left)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2573,7 +2574,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy0left 0",
|
"Example: joy0left 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy0Right)
|
std::mem_fn(&DebuggerParser::executeJoy0Right)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2583,7 +2584,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy0fire 0",
|
"Example: joy0fire 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy0Fire)
|
std::mem_fn(&DebuggerParser::executeJoy0Fire)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2593,7 +2594,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy1up 0",
|
"Example: joy1up 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy1Up)
|
std::mem_fn(&DebuggerParser::executeJoy1Up)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2603,7 +2604,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy1down 0",
|
"Example: joy1down 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy1Down)
|
std::mem_fn(&DebuggerParser::executeJoy1Down)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2613,7 +2614,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy1left 0",
|
"Example: joy1left 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy1Left)
|
std::mem_fn(&DebuggerParser::executeJoy1Left)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2623,7 +2624,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy1left 0",
|
"Example: joy1left 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy1Right)
|
std::mem_fn(&DebuggerParser::executeJoy1Right)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2633,7 +2634,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: joy1fire 0",
|
"Example: joy1fire 0",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJoy1Fire)
|
std::mem_fn(&DebuggerParser::executeJoy1Fire)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2643,7 +2644,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Moves disassembly listing to address <xx>\nExample: jump f400",
|
"Moves disassembly listing to address <xx>\nExample: jump f400",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeJump)
|
std::mem_fn(&DebuggerParser::executeJump)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2653,7 +2654,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: listbreaks (no parameters)",
|
"Example: listbreaks (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeListbreaks)
|
std::mem_fn(&DebuggerParser::executeListbreaks)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2663,7 +2664,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: listconfig 0, listconfig 1",
|
"Example: listconfig 0, listconfig 1",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeListconfig)
|
std::mem_fn(&DebuggerParser::executeListconfig)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2673,7 +2674,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: listfunctions (no parameters)",
|
"Example: listfunctions (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeListfunctions)
|
std::mem_fn(&DebuggerParser::executeListfunctions)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2683,7 +2684,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: listsavestateifs (no parameters)",
|
"Example: listsavestateifs (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeListsavestateifs)
|
std::mem_fn(&DebuggerParser::executeListsavestateifs)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2693,7 +2694,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Lists all traps (read and/or write)\nExample: listtraps (no parameters)",
|
"Lists all traps (read and/or write)\nExample: listtraps (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeListtraps)
|
std::mem_fn(&DebuggerParser::executeListtraps)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2703,7 +2704,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: loadconfig file.cfg",
|
"Example: loadconfig file.cfg",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeLoadconfig)
|
std::mem_fn(&DebuggerParser::executeLoadconfig)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2713,7 +2714,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: loadstate 0, loadstate 9",
|
"Example: loadstate 0, loadstate 9",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeLoadstate)
|
std::mem_fn(&DebuggerParser::executeLoadstate)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2723,7 +2724,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: n, n 0, n 1",
|
"Example: n, n 0, n 1",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeN)
|
std::mem_fn(&DebuggerParser::executeN)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2733,7 +2734,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: palette (no parameters)",
|
"Example: palette (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executePalette)
|
std::mem_fn(&DebuggerParser::executePalette)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2743,7 +2744,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: pc f000",
|
"Example: pc f000",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executePc)
|
std::mem_fn(&DebuggerParser::executePc)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2753,7 +2754,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Start and end of range required\nExample: pgfx f000 f010",
|
"Start and end of range required\nExample: pgfx f000 f010",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executePGfx)
|
std::mem_fn(&DebuggerParser::executePGfx)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2764,7 +2765,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: print pc, print f000",
|
"Example: print pc, print f000",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_DWORD, kARG_END_ARGS },
|
{ Parameters::ARG_DWORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executePrint)
|
std::mem_fn(&DebuggerParser::executePrint)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2774,7 +2775,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: ram, ram 80 00 ...",
|
"Example: ram, ram 80 00 ...",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeRam)
|
std::mem_fn(&DebuggerParser::executeRam)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2784,7 +2785,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"System is completely reset, just as if it was just powered on",
|
"System is completely reset, just as if it was just powered on",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeReset)
|
std::mem_fn(&DebuggerParser::executeReset)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2794,7 +2795,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: rewind, rewind 5",
|
"Example: rewind, rewind 5",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeRewind)
|
std::mem_fn(&DebuggerParser::executeRewind)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2804,7 +2805,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Display text-based output of the contents of the RIOT tab",
|
"Display text-based output of the contents of the RIOT tab",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeRiot)
|
std::mem_fn(&DebuggerParser::executeRiot)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2815,7 +2816,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: rom f000 00 01 ff ...",
|
"Example: rom f000 00 01 ff ...",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeRom)
|
std::mem_fn(&DebuggerParser::executeRom)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2825,7 +2826,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Start and end of range required\nExample: row f000 f010",
|
"Start and end of range required\nExample: row f000 f010",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeRow)
|
std::mem_fn(&DebuggerParser::executeRow)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2835,7 +2836,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Self-explanatory",
|
"Self-explanatory",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeRun)
|
std::mem_fn(&DebuggerParser::executeRun)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2846,7 +2847,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: runto lda",
|
"Example: runto lda",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_LABEL, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeRunTo)
|
std::mem_fn(&DebuggerParser::executeRunTo)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2856,7 +2857,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: runtopc f200",
|
"Example: runtopc f200",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeRunToPc)
|
std::mem_fn(&DebuggerParser::executeRunToPc)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2866,7 +2867,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Accepts 8-bit value, Example: s f0",
|
"Accepts 8-bit value, Example: s f0",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeS)
|
std::mem_fn(&DebuggerParser::executeS)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2876,7 +2877,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: save commands.script",
|
"Example: save commands.script",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_FILE, kARG_END_ARGS },
|
{ Parameters::ARG_FILE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSave)
|
std::mem_fn(&DebuggerParser::executeSave)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2886,7 +2887,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: saveconfig",
|
"Example: saveconfig",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSaveconfig)
|
std::mem_fn(&DebuggerParser::executeSaveconfig)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2897,7 +2898,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"NOTE: saves to default save location",
|
"NOTE: saves to default save location",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSavedisassembly)
|
std::mem_fn(&DebuggerParser::executeSavedisassembly)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2908,7 +2909,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"NOTE: saves to default save location",
|
"NOTE: saves to default save location",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSaverom)
|
std::mem_fn(&DebuggerParser::executeSaverom)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2919,7 +2920,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"NOTE: saves to default save location",
|
"NOTE: saves to default save location",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSaveses)
|
std::mem_fn(&DebuggerParser::executeSaveses)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2930,7 +2931,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: savesnap (no parameters)",
|
"Example: savesnap (no parameters)",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSavesnap)
|
std::mem_fn(&DebuggerParser::executeSavesnap)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2940,7 +2941,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: savestate 0, savestate 9",
|
"Example: savestate 0, savestate 9",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSavestate)
|
std::mem_fn(&DebuggerParser::executeSavestate)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2950,7 +2951,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Condition can include multiple items, see documentation\nExample: savestateif pc==f000",
|
"Condition can include multiple items, see documentation\nExample: savestateif pc==f000",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeSavestateif)
|
std::mem_fn(&DebuggerParser::executeSavestateif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2960,7 +2961,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: scanline, scanline 100",
|
"Example: scanline, scanline 100",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeScanline)
|
std::mem_fn(&DebuggerParser::executeScanline)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2970,7 +2971,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: step, step 100",
|
"Example: step, step 100",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeStep)
|
std::mem_fn(&DebuggerParser::executeStep)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2980,7 +2981,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: stepwhile pc!=$f2a9",
|
"Example: stepwhile pc!=$f2a9",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeStepwhile)
|
std::mem_fn(&DebuggerParser::executeStepwhile)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2990,7 +2991,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Display text-based output of the contents of the TIA tab",
|
"Display text-based output of the contents of the TIA tab",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeTia)
|
std::mem_fn(&DebuggerParser::executeTia)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3000,7 +3001,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trace, trace 100",
|
"Example: trace, trace 100",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeTrace)
|
std::mem_fn(&DebuggerParser::executeTrace)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3011,7 +3012,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trap f000, trap f000 f100",
|
"Example: trap f000, trap f000 f100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeTrap)
|
std::mem_fn(&DebuggerParser::executeTrap)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3022,7 +3023,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trapif _scan>#100 GRP0, trapif _bank==1 f000 f100",
|
"Example: trapif _scan>#100 GRP0, trapif _bank==1 f000 f100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeTrapif)
|
std::mem_fn(&DebuggerParser::executeTrapif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3033,7 +3034,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trapread f000, trapread f000 f100",
|
"Example: trapread f000, trapread f000 f100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeTrapread)
|
std::mem_fn(&DebuggerParser::executeTrapread)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3044,7 +3045,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trapreadif _scan>#100 GRP0, trapreadif _bank==1 f000 f100",
|
"Example: trapreadif _scan>#100 GRP0, trapreadif _bank==1 f000 f100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeTrapreadif)
|
std::mem_fn(&DebuggerParser::executeTrapreadif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3055,7 +3056,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trapwrite f000, trapwrite f000 f100",
|
"Example: trapwrite f000, trapwrite f000 f100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeTrapwrite)
|
std::mem_fn(&DebuggerParser::executeTrapwrite)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3066,7 +3067,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: trapwriteif _scan>#100 GRP0, trapwriteif _bank==1 f000 f100",
|
"Example: trapwriteif _scan>#100 GRP0, trapwriteif _bank==1 f000 f100",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeTrapwriteif)
|
std::mem_fn(&DebuggerParser::executeTrapwriteif)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3076,7 +3077,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: type f000, type f000 f010",
|
"Example: type f000, type f000 f010",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
std::mem_fn(&DebuggerParser::executeType)
|
std::mem_fn(&DebuggerParser::executeType)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3087,7 +3088,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: uhex (no parameters)",
|
"Example: uhex (no parameters)",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_END_ARGS },
|
{ Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeUHex)
|
std::mem_fn(&DebuggerParser::executeUHex)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3097,7 +3098,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: undef LABEL1",
|
"Example: undef LABEL1",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_LABEL, kARG_END_ARGS },
|
{ Parameters::ARG_LABEL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeUndef)
|
std::mem_fn(&DebuggerParser::executeUndef)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3107,7 +3108,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: unwind, unwind 5",
|
"Example: unwind, unwind 5",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeUnwind)
|
std::mem_fn(&DebuggerParser::executeUnwind)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3117,7 +3118,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: v, v 0, v 1",
|
"Example: v, v 0, v 1",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeV)
|
std::mem_fn(&DebuggerParser::executeV)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3127,7 +3128,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: watch ram_80",
|
"Example: watch ram_80",
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
{ kARG_WORD, kARG_END_ARGS },
|
{ Parameters::ARG_WORD, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeWatch)
|
std::mem_fn(&DebuggerParser::executeWatch)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3137,7 +3138,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Valid value is 0 - ff\nExample: x ff, x #10",
|
"Valid value is 0 - ff\nExample: x ff, x #10",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeX)
|
std::mem_fn(&DebuggerParser::executeX)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3147,7 +3148,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Valid value is 0 - ff\nExample: y ff, y #10",
|
"Valid value is 0 - ff\nExample: y ff, y #10",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ Parameters::ARG_BYTE, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeY)
|
std::mem_fn(&DebuggerParser::executeY)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3157,7 +3158,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
||||||
"Example: z, z 0, z 1",
|
"Example: z, z 0, z 1",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ kARG_BOOL, kARG_END_ARGS },
|
{ Parameters::ARG_BOOL, Parameters::ARG_END_ARGS },
|
||||||
std::mem_fn(&DebuggerParser::executeZ)
|
std::mem_fn(&DebuggerParser::executeZ)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,38 +66,40 @@ class DebuggerParser
|
||||||
string saveScriptFile(string file);
|
string saveScriptFile(string file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum { kNumCommands = 92 };
|
|
||||||
|
|
||||||
// Constants for argument processing
|
// Constants for argument processing
|
||||||
enum {
|
enum class ParseState {
|
||||||
kIN_COMMAND,
|
IN_COMMAND,
|
||||||
kIN_SPACE,
|
IN_SPACE,
|
||||||
kIN_BRACE,
|
IN_BRACE,
|
||||||
kIN_ARG
|
IN_ARG
|
||||||
};
|
};
|
||||||
|
|
||||||
enum parameters {
|
enum class Parameters {
|
||||||
kARG_WORD, // single 16-bit value
|
ARG_WORD, // single 16-bit value
|
||||||
kARG_DWORD, // single 32-bit value
|
ARG_DWORD, // single 32-bit value
|
||||||
kARG_MULTI_WORD, // multiple 16-bit values (must occur last)
|
ARG_MULTI_WORD, // multiple 16-bit values (must occur last)
|
||||||
kARG_BYTE, // single 8-bit value
|
ARG_BYTE, // single 8-bit value
|
||||||
kARG_MULTI_BYTE, // multiple 8-bit values (must occur last)
|
ARG_MULTI_BYTE, // multiple 8-bit values (must occur last)
|
||||||
kARG_BOOL, // 0 or 1 only
|
ARG_BOOL, // 0 or 1 only
|
||||||
kARG_LABEL, // label (need not be defined, treated as string)
|
ARG_LABEL, // label (need not be defined, treated as string)
|
||||||
kARG_FILE, // filename
|
ARG_FILE, // filename
|
||||||
kARG_BASE_SPCL, // base specifier: 2, 10, or 16 (or "bin" "dec" "hex")
|
ARG_BASE_SPCL, // base specifier: 2, 10, or 16 (or "bin" "dec" "hex")
|
||||||
kARG_END_ARGS // sentinel, occurs at end of list
|
ARG_END_ARGS // sentinel, occurs at end of list
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// List of commands available
|
||||||
|
static constexpr uInt32 NumCommands = 92;
|
||||||
struct Command {
|
struct Command {
|
||||||
string cmdString;
|
string cmdString;
|
||||||
string description;
|
string description;
|
||||||
string extendedDesc;
|
string extendedDesc;
|
||||||
bool parmsRequired;
|
bool parmsRequired;
|
||||||
bool refreshRequired;
|
bool refreshRequired;
|
||||||
parameters parms[10];
|
Parameters parms[10];
|
||||||
std::function<void (DebuggerParser*)> executor;
|
std::function<void (DebuggerParser*)> executor;
|
||||||
};
|
};
|
||||||
|
static Command commands[NumCommands];
|
||||||
|
|
||||||
struct Trap
|
struct Trap
|
||||||
{
|
{
|
||||||
bool read;
|
bool read;
|
||||||
|
@ -233,9 +235,6 @@ class DebuggerParser
|
||||||
void executeY();
|
void executeY();
|
||||||
void executeZ();
|
void executeZ();
|
||||||
|
|
||||||
// List of commands available
|
|
||||||
static Command commands[kNumCommands];
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
DebuggerParser() = delete;
|
DebuggerParser() = delete;
|
||||||
|
|
|
@ -81,7 +81,7 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
// multi-byte instruction, then we make note of that address for reference
|
// multi-byte instruction, then we make note of that address for reference
|
||||||
//
|
//
|
||||||
// However, we only do this for labels pointing to ROM (above $1000)
|
// However, we only do this for labels pointing to ROM (above $1000)
|
||||||
if (myDbg.addressType(k + myOffset) == CartDebug::ADDR_ROM) {
|
if (myDbg.addressType(k + myOffset) == CartDebug::AddrType::ROM) {
|
||||||
reservedLabel.str("");
|
reservedLabel.str("");
|
||||||
reservedLabel << "L" << Base::HEX4 << (k + myOffset);
|
reservedLabel << "L" << Base::HEX4 << (k + myOffset);
|
||||||
myReserved.Label.emplace(k + myOffset, reservedLabel.str());
|
myReserved.Label.emplace(k + myOffset, reservedLabel.str());
|
||||||
|
@ -877,11 +877,11 @@ int DiStella::mark(uInt32 address, uInt8 mask, bool directive)
|
||||||
// Check for equates before ROM/ZP-RAM accesses, because the original logic
|
// Check for equates before ROM/ZP-RAM accesses, because the original logic
|
||||||
// of Distella assumed either equates or ROM; it didn't take ZP-RAM into account
|
// of Distella assumed either equates or ROM; it didn't take ZP-RAM into account
|
||||||
CartDebug::AddrType type = myDbg.addressType(address);
|
CartDebug::AddrType type = myDbg.addressType(address);
|
||||||
if (type == CartDebug::ADDR_TIA) {
|
if (type == CartDebug::AddrType::TIA) {
|
||||||
return 2;
|
return 2;
|
||||||
} else if (type == CartDebug::ADDR_IO) {
|
} else if (type == CartDebug::AddrType::IO) {
|
||||||
return 3;
|
return 3;
|
||||||
} else if (type == CartDebug::ADDR_ZPRAM && myOffset != 0) {
|
} else if (type == CartDebug::AddrType::ZPRAM && myOffset != 0) {
|
||||||
return 5;
|
return 5;
|
||||||
} else if (address >= uInt32(myOffset) && address <= uInt32(myAppData.end + myOffset)) {
|
} else if (address >= uInt32(myOffset) && address <= uInt32(myAppData.end + myOffset)) {
|
||||||
myLabels[address - myOffset] = myLabels[address - myOffset] | mask;
|
myLabels[address - myOffset] = myLabels[address - myOffset] | mask;
|
||||||
|
|
|
@ -75,8 +75,8 @@ EventHandler::EventHandler(OSystem& osystem)
|
||||||
myPJoyHandler = make_unique<PhysicalJoystickHandler>(osystem, *this, myEvent);
|
myPJoyHandler = make_unique<PhysicalJoystickHandler>(osystem, *this, myEvent);
|
||||||
|
|
||||||
// Erase the 'combo' array
|
// Erase the 'combo' array
|
||||||
for(int i = 0; i < kComboSize; ++i)
|
for(int i = 0; i < COMBO_SIZE; ++i)
|
||||||
for(int j = 0; j < kEventsPerCombo; ++j)
|
for(int j = 0; j < EVENTS_PER_COMBO; ++j)
|
||||||
myComboTable[i][j] = Event::NoType;
|
myComboTable[i][j] = Event::NoType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ void EventHandler::handleEvent(Event::Type event, bool pressed)
|
||||||
case Event::Combo14:
|
case Event::Combo14:
|
||||||
case Event::Combo15:
|
case Event::Combo15:
|
||||||
case Event::Combo16:
|
case Event::Combo16:
|
||||||
for(int i = 0, combo = event - Event::Combo1; i < kEventsPerCombo; ++i)
|
for(int i = 0, combo = event - Event::Combo1; i < EVENTS_PER_COMBO; ++i)
|
||||||
if(myComboTable[combo][i] != Event::NoType)
|
if(myComboTable[combo][i] != Event::NoType)
|
||||||
handleEvent(myComboTable[combo][i], pressed);
|
handleEvent(myComboTable[combo][i], pressed);
|
||||||
return;
|
return;
|
||||||
|
@ -690,11 +690,11 @@ void EventHandler::setActionMappings(EventMode mode)
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{
|
{
|
||||||
case kEmulationMode:
|
case kEmulationMode:
|
||||||
listsize = kEmulActionListSize;
|
listsize = EMUL_ACTIONLIST_SIZE;
|
||||||
list = ourEmulActionList;
|
list = ourEmulActionList;
|
||||||
break;
|
break;
|
||||||
case kMenuMode:
|
case kMenuMode:
|
||||||
listsize = kMenuActionListSize;
|
listsize = MENU_ACTIONLIST_SIZE;
|
||||||
list = ourMenuActionList;
|
list = ourMenuActionList;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -768,8 +768,8 @@ void EventHandler::setComboMap()
|
||||||
|
|
||||||
// Erase the 'combo' array
|
// Erase the 'combo' array
|
||||||
auto ERASE_ALL = [&]() {
|
auto ERASE_ALL = [&]() {
|
||||||
for(int i = 0; i < kComboSize; ++i)
|
for(int i = 0; i < COMBO_SIZE; ++i)
|
||||||
for(int j = 0; j < kEventsPerCombo; ++j)
|
for(int j = 0; j < EVENTS_PER_COMBO; ++j)
|
||||||
myComboTable[i][j] = Event::NoType;
|
myComboTable[i][j] = Event::NoType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -781,18 +781,18 @@ void EventHandler::setComboMap()
|
||||||
{
|
{
|
||||||
string key;
|
string key;
|
||||||
buf >> key;
|
buf >> key;
|
||||||
if(atoi(key.c_str()) == kComboSize)
|
if(atoi(key.c_str()) == COMBO_SIZE)
|
||||||
{
|
{
|
||||||
// Fill the combomap table with events for as long as they exist
|
// Fill the combomap table with events for as long as they exist
|
||||||
int combocount = 0;
|
int combocount = 0;
|
||||||
while(buf >> key && combocount < kComboSize)
|
while(buf >> key && combocount < COMBO_SIZE)
|
||||||
{
|
{
|
||||||
// Each event in a comboevent is separated by a comma
|
// Each event in a comboevent is separated by a comma
|
||||||
replace(key.begin(), key.end(), ',', ' ');
|
replace(key.begin(), key.end(), ',', ' ');
|
||||||
istringstream buf2(key);
|
istringstream buf2(key);
|
||||||
|
|
||||||
int eventcount = 0;
|
int eventcount = 0;
|
||||||
while(buf2 >> key && eventcount < kEventsPerCombo)
|
while(buf2 >> key && eventcount < EVENTS_PER_COMBO)
|
||||||
{
|
{
|
||||||
myComboTable[combocount][eventcount] = Event::Type(atoi(key.c_str()));
|
myComboTable[combocount][eventcount] = Event::Type(atoi(key.c_str()));
|
||||||
++eventcount;
|
++eventcount;
|
||||||
|
@ -931,11 +931,11 @@ void EventHandler::saveComboMapping()
|
||||||
// For each combo event, create a comma-separated list of its events
|
// For each combo event, create a comma-separated list of its events
|
||||||
// Prepend the event count, so we can check it on next load
|
// Prepend the event count, so we can check it on next load
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
buf << kComboSize;
|
buf << COMBO_SIZE;
|
||||||
for(int i = 0; i < kComboSize; ++i)
|
for(int i = 0; i < COMBO_SIZE; ++i)
|
||||||
{
|
{
|
||||||
buf << ":" << myComboTable[i][0];
|
buf << ":" << myComboTable[i][0];
|
||||||
for(int j = 1; j < kEventsPerCombo; ++j)
|
for(int j = 1; j < EVENTS_PER_COMBO; ++j)
|
||||||
buf << "," << myComboTable[i][j];
|
buf << "," << myComboTable[i][j];
|
||||||
}
|
}
|
||||||
myOSystem.settings().setValue("combomap", buf.str());
|
myOSystem.settings().setValue("combomap", buf.str());
|
||||||
|
@ -948,11 +948,11 @@ StringList EventHandler::getActionList(EventMode mode) const
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{
|
{
|
||||||
case kEmulationMode:
|
case kEmulationMode:
|
||||||
for(uInt32 i = 0; i < kEmulActionListSize; ++i)
|
for(uInt32 i = 0; i < EMUL_ACTIONLIST_SIZE; ++i)
|
||||||
l.push_back(EventHandler::ourEmulActionList[i].action);
|
l.push_back(EventHandler::ourEmulActionList[i].action);
|
||||||
break;
|
break;
|
||||||
case kMenuMode:
|
case kMenuMode:
|
||||||
for(uInt32 i = 0; i < kMenuActionListSize; ++i)
|
for(uInt32 i = 0; i < MENU_ACTIONLIST_SIZE; ++i)
|
||||||
l.push_back(EventHandler::ourMenuActionList[i].action);
|
l.push_back(EventHandler::ourMenuActionList[i].action);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -969,7 +969,7 @@ VariantList EventHandler::getComboList(EventMode /**/) const
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
|
|
||||||
VarList::push_back(l, "None", "-1");
|
VarList::push_back(l, "None", "-1");
|
||||||
for(uInt32 i = 0; i < kEmulActionListSize; ++i)
|
for(uInt32 i = 0; i < EMUL_ACTIONLIST_SIZE; ++i)
|
||||||
{
|
{
|
||||||
if(EventHandler::ourEmulActionList[i].allow_combo)
|
if(EventHandler::ourEmulActionList[i].allow_combo)
|
||||||
{
|
{
|
||||||
|
@ -989,10 +989,10 @@ StringList EventHandler::getComboListForEvent(Event::Type event) const
|
||||||
if(event >= Event::Combo1 && event <= Event::Combo16)
|
if(event >= Event::Combo1 && event <= Event::Combo16)
|
||||||
{
|
{
|
||||||
int combo = event - Event::Combo1;
|
int combo = event - Event::Combo1;
|
||||||
for(uInt32 i = 0; i < kEventsPerCombo; ++i)
|
for(uInt32 i = 0; i < EVENTS_PER_COMBO; ++i)
|
||||||
{
|
{
|
||||||
Event::Type e = myComboTable[combo][i];
|
Event::Type e = myComboTable[combo][i];
|
||||||
for(uInt32 j = 0; j < kEmulActionListSize; ++j)
|
for(uInt32 j = 0; j < EMUL_ACTIONLIST_SIZE; ++j)
|
||||||
{
|
{
|
||||||
if(EventHandler::ourEmulActionList[j].event == e &&
|
if(EventHandler::ourEmulActionList[j].event == e &&
|
||||||
EventHandler::ourEmulActionList[j].allow_combo)
|
EventHandler::ourEmulActionList[j].allow_combo)
|
||||||
|
@ -1020,7 +1020,7 @@ void EventHandler::setComboListForEvent(Event::Type event, const StringList& eve
|
||||||
for(int i = 0; i < 8; ++i)
|
for(int i = 0; i < 8; ++i)
|
||||||
{
|
{
|
||||||
int idx = atoi(events[i].c_str());
|
int idx = atoi(events[i].c_str());
|
||||||
if(idx >=0 && idx < kEmulActionListSize)
|
if(idx >= 0 && idx < EMUL_ACTIONLIST_SIZE)
|
||||||
myComboTable[combo][i] = EventHandler::ourEmulActionList[idx].event;
|
myComboTable[combo][i] = EventHandler::ourEmulActionList[idx].event;
|
||||||
else
|
else
|
||||||
myComboTable[combo][i] = Event::NoType;
|
myComboTable[combo][i] = Event::NoType;
|
||||||
|
@ -1035,12 +1035,12 @@ Event::Type EventHandler::eventAtIndex(int idx, EventMode mode) const
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{
|
{
|
||||||
case kEmulationMode:
|
case kEmulationMode:
|
||||||
if(idx < 0 || idx >= kEmulActionListSize)
|
if(idx < 0 || idx >= EMUL_ACTIONLIST_SIZE)
|
||||||
return Event::NoType;
|
return Event::NoType;
|
||||||
else
|
else
|
||||||
return ourEmulActionList[idx].event;
|
return ourEmulActionList[idx].event;
|
||||||
case kMenuMode:
|
case kMenuMode:
|
||||||
if(idx < 0 || idx >= kMenuActionListSize)
|
if(idx < 0 || idx >= MENU_ACTIONLIST_SIZE)
|
||||||
return Event::NoType;
|
return Event::NoType;
|
||||||
else
|
else
|
||||||
return ourMenuActionList[idx].event;
|
return ourMenuActionList[idx].event;
|
||||||
|
@ -1055,12 +1055,12 @@ string EventHandler::actionAtIndex(int idx, EventMode mode) const
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{
|
{
|
||||||
case kEmulationMode:
|
case kEmulationMode:
|
||||||
if(idx < 0 || idx >= kEmulActionListSize)
|
if(idx < 0 || idx >= EMUL_ACTIONLIST_SIZE)
|
||||||
return EmptyString;
|
return EmptyString;
|
||||||
else
|
else
|
||||||
return ourEmulActionList[idx].action;
|
return ourEmulActionList[idx].action;
|
||||||
case kMenuMode:
|
case kMenuMode:
|
||||||
if(idx < 0 || idx >= kMenuActionListSize)
|
if(idx < 0 || idx >= MENU_ACTIONLIST_SIZE)
|
||||||
return EmptyString;
|
return EmptyString;
|
||||||
else
|
else
|
||||||
return ourMenuActionList[idx].action;
|
return ourMenuActionList[idx].action;
|
||||||
|
@ -1075,12 +1075,12 @@ string EventHandler::keyAtIndex(int idx, EventMode mode) const
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{
|
{
|
||||||
case kEmulationMode:
|
case kEmulationMode:
|
||||||
if(idx < 0 || idx >= kEmulActionListSize)
|
if(idx < 0 || idx >= EMUL_ACTIONLIST_SIZE)
|
||||||
return EmptyString;
|
return EmptyString;
|
||||||
else
|
else
|
||||||
return ourEmulActionList[idx].key;
|
return ourEmulActionList[idx].key;
|
||||||
case kMenuMode:
|
case kMenuMode:
|
||||||
if(idx < 0 || idx >= kMenuActionListSize)
|
if(idx < 0 || idx >= MENU_ACTIONLIST_SIZE)
|
||||||
return EmptyString;
|
return EmptyString;
|
||||||
else
|
else
|
||||||
return ourMenuActionList[idx].key;
|
return ourMenuActionList[idx].key;
|
||||||
|
@ -1268,7 +1268,7 @@ void EventHandler::setState(EventHandlerState state)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EventHandler::ActionList EventHandler::ourEmulActionList[kEmulActionListSize] = {
|
EventHandler::ActionList EventHandler::ourEmulActionList[EMUL_ACTIONLIST_SIZE] = {
|
||||||
{ Event::ConsoleSelect, "Select", "", true },
|
{ Event::ConsoleSelect, "Select", "", true },
|
||||||
{ Event::ConsoleReset, "Reset", "", true },
|
{ Event::ConsoleReset, "Reset", "", true },
|
||||||
{ Event::ConsoleColor, "Color TV", "", true },
|
{ Event::ConsoleColor, "Color TV", "", true },
|
||||||
|
@ -1380,7 +1380,7 @@ EventHandler::ActionList EventHandler::ourEmulActionList[kEmulActionListSize] =
|
||||||
};
|
};
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EventHandler::ActionList EventHandler::ourMenuActionList[kMenuActionListSize] = {
|
EventHandler::ActionList EventHandler::ourMenuActionList[MENU_ACTIONLIST_SIZE] = {
|
||||||
{ Event::UIUp, "Move Up", "", false },
|
{ Event::UIUp, "Move Up", "", false },
|
||||||
{ Event::UIDown, "Move Down", "", false },
|
{ Event::UIDown, "Move Down", "", false },
|
||||||
{ Event::UILeft, "Move Left", "", false },
|
{ Event::UILeft, "Move Left", "", false },
|
||||||
|
|
|
@ -360,12 +360,12 @@ class EventHandler
|
||||||
void removePhysicalJoystick(int index);
|
void removePhysicalJoystick(int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {
|
static constexpr Int32
|
||||||
kComboSize = 16,
|
COMBO_SIZE = 16,
|
||||||
kEventsPerCombo = 8,
|
EVENTS_PER_COMBO = 8,
|
||||||
kEmulActionListSize = 83 + kComboSize,
|
EMUL_ACTIONLIST_SIZE = 83 + COMBO_SIZE,
|
||||||
kMenuActionListSize = 14
|
MENU_ACTIONLIST_SIZE = 14
|
||||||
};
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The following methods take care of assigning action mappings.
|
The following methods take care of assigning action mappings.
|
||||||
|
@ -403,7 +403,7 @@ class EventHandler
|
||||||
unique_ptr<MouseControl> myMouseControl;
|
unique_ptr<MouseControl> myMouseControl;
|
||||||
|
|
||||||
// The event(s) assigned to each combination event
|
// The event(s) assigned to each combination event
|
||||||
Event::Type myComboTable[kComboSize][kEventsPerCombo];
|
Event::Type myComboTable[COMBO_SIZE][EVENTS_PER_COMBO];
|
||||||
|
|
||||||
// Indicates the current state of the system (ie, which mode is current)
|
// Indicates the current state of the system (ie, which mode is current)
|
||||||
EventHandlerState myState;
|
EventHandlerState myState;
|
||||||
|
@ -423,8 +423,8 @@ class EventHandler
|
||||||
bool myIs7800;
|
bool myIs7800;
|
||||||
|
|
||||||
// Holds static strings for the remap menu (emulation and menu events)
|
// Holds static strings for the remap menu (emulation and menu events)
|
||||||
static ActionList ourEmulActionList[kEmulActionListSize];
|
static ActionList ourEmulActionList[EMUL_ACTIONLIST_SIZE];
|
||||||
static ActionList ourMenuActionList[kMenuActionListSize];
|
static ActionList ourMenuActionList[MENU_ACTIONLIST_SIZE];
|
||||||
|
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
EventHandler() = delete;
|
EventHandler() = delete;
|
||||||
|
|
|
@ -326,13 +326,12 @@ class M6502 : public Serializable
|
||||||
handled such as stopping execution, fatal errors, maskable interrupts
|
handled such as stopping execution, fatal errors, maskable interrupts
|
||||||
and non-maskable interrupts (in myExecutionStatus)
|
and non-maskable interrupts (in myExecutionStatus)
|
||||||
*/
|
*/
|
||||||
enum
|
static constexpr uInt8
|
||||||
{
|
|
||||||
StopExecutionBit = 0x01,
|
StopExecutionBit = 0x01,
|
||||||
FatalErrorBit = 0x02,
|
FatalErrorBit = 0x02,
|
||||||
MaskableInterruptBit = 0x04,
|
MaskableInterruptBit = 0x04,
|
||||||
NonmaskableInterruptBit = 0x08
|
NonmaskableInterruptBit = 0x08
|
||||||
};
|
;
|
||||||
uInt8 myExecutionStatus;
|
uInt8 myExecutionStatus;
|
||||||
|
|
||||||
/// Pointer to the system the processor is installed in or the null pointer
|
/// Pointer to the system the processor is installed in or the null pointer
|
||||||
|
@ -397,12 +396,6 @@ class M6502 : public Serializable
|
||||||
bool myHaltRequested;
|
bool myHaltRequested;
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
enum CondAction
|
|
||||||
{
|
|
||||||
breakAction,
|
|
||||||
saveStateAction
|
|
||||||
};
|
|
||||||
|
|
||||||
Int32 evalCondBreaks() {
|
Int32 evalCondBreaks() {
|
||||||
for(uInt32 i = 0; i < myCondBreaks.size(); i++)
|
for(uInt32 i = 0; i < myCondBreaks.size(); i++)
|
||||||
if(myCondBreaks[i]->evaluate())
|
if(myCondBreaks[i]->evaluate())
|
||||||
|
|
|
@ -155,13 +155,6 @@ class M6532 : public Device
|
||||||
#endif // DEBUGGER_SUPPORT
|
#endif // DEBUGGER_SUPPORT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Accessible bits in the interrupt flag register
|
|
||||||
// All other bits are always zeroed
|
|
||||||
enum {
|
|
||||||
TimerBit = 0x80,
|
|
||||||
PA7Bit = 0x40
|
|
||||||
};
|
|
||||||
|
|
||||||
// Reference to the console
|
// Reference to the console
|
||||||
const ConsoleIO& myConsole;
|
const ConsoleIO& myConsole;
|
||||||
|
|
||||||
|
@ -212,6 +205,10 @@ class M6532 : public Device
|
||||||
// Last value written to the timer registers
|
// Last value written to the timer registers
|
||||||
uInt8 myOutTimer[4];
|
uInt8 myOutTimer[4];
|
||||||
|
|
||||||
|
// Accessible bits in the interrupt flag register
|
||||||
|
// All other bits are always zeroed
|
||||||
|
static constexpr uInt8 TimerBit = 0x80, PA7Bit = 0x40;
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
// The arrays containing information about every byte of RIOT
|
// The arrays containing information about every byte of RIOT
|
||||||
// indicating whether and how (RW) it is used.
|
// indicating whether and how (RW) it is used.
|
||||||
|
|
Loading…
Reference in New Issue