mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
Add time command to MAME debugger. Returns current machine time. (#9727)
This commit is contained in:
parent
382b86aa49
commit
b66858d124
@ -245,6 +245,7 @@ debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu
|
||||
m_console.register_command("suspend", CMDFLAG_NONE, 0, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_suspend, this, _1));
|
||||
m_console.register_command("resume", CMDFLAG_NONE, 0, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_resume, this, _1));
|
||||
m_console.register_command("cpulist", CMDFLAG_NONE, 0, 0, std::bind(&debugger_commands::execute_cpulist, this, _1));
|
||||
m_console.register_command("time", CMDFLAG_NONE, 0, 0, std::bind(&debugger_commands::execute_time, this, _1));
|
||||
|
||||
m_console.register_command("comadd", CMDFLAG_NONE, 1, 2, std::bind(&debugger_commands::execute_comment_add, this, _1));
|
||||
m_console.register_command("//", CMDFLAG_NONE, 1, 2, std::bind(&debugger_commands::execute_comment_add, this, _1));
|
||||
@ -1671,6 +1672,15 @@ void debugger_commands::execute_cpulist(const std::vector<std::string> ¶ms)
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// execute_time - execute the time command
|
||||
//-------------------------------------------------
|
||||
|
||||
void debugger_commands::execute_time(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
m_console.printf("%s\n", m_machine.time().as_string());
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
execute_comment - add a comment to a line
|
||||
-------------------------------------------------*/
|
||||
|
@ -130,6 +130,7 @@ private:
|
||||
void execute_resume(const std::vector<std::string> ¶ms);
|
||||
void execute_next(const std::vector<std::string> ¶ms);
|
||||
void execute_cpulist(const std::vector<std::string> ¶ms);
|
||||
void execute_time(const std::vector<std::string> ¶ms);
|
||||
void execute_comment_add(const std::vector<std::string> ¶ms);
|
||||
void execute_comment_del(const std::vector<std::string> ¶ms);
|
||||
void execute_comment_save(const std::vector<std::string> ¶ms);
|
||||
|
@ -81,6 +81,7 @@ const help_item f_static_help_list[] =
|
||||
" stateload[sl] <filename> -- load a state file for the current driver\n"
|
||||
" snap [<filename>] -- save a screen snapshot.\n"
|
||||
" source <filename> -- reads commands from <filename> and executes them one by one\n"
|
||||
" time -- prints current machine time to the console\n"
|
||||
" cls -- clears the console text buffer\n"
|
||||
" quit -- exits MAME and the debugger\n"
|
||||
},
|
||||
@ -580,6 +581,13 @@ const help_item f_static_help_list[] =
|
||||
"source break_and_trace.cmd\n"
|
||||
" Reads in debugger commands from break_and_trace.cmd and executes them.\n"
|
||||
},
|
||||
{
|
||||
"time",
|
||||
"\n"
|
||||
" time\n"
|
||||
"\n"
|
||||
"The time command prints the current machine time to the console.\n"
|
||||
},
|
||||
{
|
||||
"quit",
|
||||
"\n"
|
||||
|
Loading…
Reference in New Issue
Block a user