summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/cheat.cpp8
-rw-r--r--src/frontend/mame/cheat.h4
-rw-r--r--src/frontend/mame/clifront.cpp10
3 files changed, 15 insertions, 7 deletions
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp
index 06d87596e68..1ac5039fa7f 100644
--- a/src/frontend/mame/cheat.cpp
+++ b/src/frontend/mame/cheat.cpp
@@ -1069,8 +1069,8 @@ cheat_manager::cheat_manager(running_machine &machine)
// create a global symbol table
m_symtable.add("frame", symbol_table::READ_ONLY, &m_framecount);
- m_symtable.add("frombcd", nullptr, 1, 1, execute_frombcd);
- m_symtable.add("tobcd", nullptr, 1, 1, execute_tobcd);
+ m_symtable.add("frombcd", 1, 1, execute_frombcd);
+ m_symtable.add("tobcd", 1, 1, execute_tobcd);
// we rely on the debugger expression callbacks; if the debugger isn't
// enabled, we must jumpstart them manually
@@ -1320,7 +1320,7 @@ std::string cheat_manager::quote_expression(const parsed_expression &expression)
// execute_frombcd - convert a value from BCD
//-------------------------------------------------
-uint64_t cheat_manager::execute_frombcd(symbol_table &table, void *ref, int params, const uint64_t *param)
+uint64_t cheat_manager::execute_frombcd(symbol_table &table, int params, const uint64_t *param)
{
uint64_t value(param[0]);
uint64_t multiplier(1);
@@ -1340,7 +1340,7 @@ uint64_t cheat_manager::execute_frombcd(symbol_table &table, void *ref, int para
// execute_tobcd - convert a value to BCD
//-------------------------------------------------
-uint64_t cheat_manager::execute_tobcd(symbol_table &table, void *ref, int params, const uint64_t *param)
+uint64_t cheat_manager::execute_tobcd(symbol_table &table, int params, const uint64_t *param)
{
uint64_t value(param[0]);
uint64_t result(0);
diff --git a/src/frontend/mame/cheat.h b/src/frontend/mame/cheat.h
index b685dba2c33..d05890c7152 100644
--- a/src/frontend/mame/cheat.h
+++ b/src/frontend/mame/cheat.h
@@ -327,8 +327,8 @@ public:
// global helpers
static std::string quote_expression(parsed_expression const &expression);
- static uint64_t execute_frombcd(symbol_table &table, void *ref, int params, uint64_t const *param);
- static uint64_t execute_tobcd(symbol_table &table, void *ref, int params, uint64_t const *param);
+ static uint64_t execute_frombcd(symbol_table &table, int params, uint64_t const *param);
+ static uint64_t execute_tobcd(symbol_table &table, int params, uint64_t const *param);
private:
// internal helpers
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp
index 91a4df81b3c..a219ec614c7 100644
--- a/src/frontend/mame/clifront.cpp
+++ b/src/frontend/mame/clifront.cpp
@@ -719,7 +719,15 @@ void cli_frontend::listdevices(const std::vector<std::string> &args)
// sort them by tag
std::sort(device_list.begin(), device_list.end(), [](device_t *dev1, device_t *dev2) {
- return strcmp(dev1->tag(), dev2->tag()) < 0;
+ // end of string < ':' < '0'
+ const char *tag1 = dev1->tag();
+ const char *tag2 = dev2->tag();
+ while (*tag1 == *tag2 && *tag1 != '\0' && *tag2 != '\0')
+ {
+ tag1++;
+ tag2++;
+ }
+ return (*tag1 == ':' ? ' ' : *tag1) < (*tag2 == ':' ? ' ' : *tag2);
});
// dump the results