Change debugger command handler parameter vector element type from std::string to std::string_view

This commit is contained in:
AJR 2022-08-02 08:21:53 -04:00
parent 786016ae25
commit 9d0076ab91
28 changed files with 413 additions and 355 deletions

View File

@ -862,17 +862,17 @@ bool arm7_cpu_device::translate_vaddr_to_paddr(offs_t &vaddr, const int flags)
} }
} }
void arm7_cpu_device::translate_insn_command(const std::vector<std::string> &params) void arm7_cpu_device::translate_insn_command(const std::vector<std::string_view> &params)
{ {
translate_command(params, TRANSLATE_FETCH); translate_command(params, TRANSLATE_FETCH);
} }
void arm7_cpu_device::translate_data_command(const std::vector<std::string> &params) void arm7_cpu_device::translate_data_command(const std::vector<std::string_view> &params)
{ {
translate_command(params, TRANSLATE_READ); translate_command(params, TRANSLATE_READ);
} }
void arm7_cpu_device::translate_command(const std::vector<std::string> &params, int intention) void arm7_cpu_device::translate_command(const std::vector<std::string_view> &params, int intention)
{ {
uint64_t vaddr; uint64_t vaddr;

View File

@ -146,9 +146,9 @@ protected:
uint32_t m_r[/*NUM_REGS*/37]; uint32_t m_r[/*NUM_REGS*/37];
void translate_insn_command(const std::vector<std::string> &params); void translate_insn_command(const std::vector<std::string_view> &params);
void translate_data_command(const std::vector<std::string> &params); void translate_data_command(const std::vector<std::string_view> &params);
void translate_command(const std::vector<std::string> &params, int intention); void translate_command(const std::vector<std::string_view> &params, int intention);
void update_insn_prefetch(uint32_t curr_pc); void update_insn_prefetch(uint32_t curr_pc);
bool insn_fetch_thumb(uint32_t pc, uint32_t &out_insn); bool insn_fetch_thumb(uint32_t pc, uint32_t &out_insn);

View File

@ -51,7 +51,7 @@ device_memory_interface::space_config_vector acorn_memc_device::memory_space_con
}; };
} }
void acorn_memc_device::memc_map_debug_commands(const std::vector<std::string> &params) void acorn_memc_device::memc_map_debug_commands(const std::vector<std::string_view> &params)
{ {
uint64_t offset; uint64_t offset;
if (params.size() != 1 || !machine().debugger().commands().validate_number_parameter(params[0], offset)) if (params.size() != 1 || !machine().debugger().commands().validate_number_parameter(params[0], offset))

View File

@ -60,7 +60,7 @@ protected:
virtual space_config_vector memory_space_config() const override; virtual space_config_vector memory_space_config() const override;
private: private:
void memc_map_debug_commands(const std::vector<std::string> &params); void memc_map_debug_commands(const std::vector<std::string_view> &params);
uint32_t dram_address(uint32_t address); uint32_t dram_address(uint32_t address);
bool is_valid_access(int page, bool write); bool is_valid_access(int page, bool write);
uint32_t invalid_access(bool is_write, offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t invalid_access(bool is_write, offs_t offset, uint32_t data, uint32_t mem_mask = ~0);

View File

@ -982,7 +982,7 @@ bool sun4_mmu_base_device::translate(uint32_t &addr)
return entry.valid; return entry.valid;
} }
void sun4_mmu_base_device::l2p_command(const std::vector<std::string> &params) void sun4_mmu_base_device::l2p_command(const std::vector<std::string_view> &params)
{ {
uint64_t addr, offset; uint64_t addr, offset;

View File

@ -137,7 +137,7 @@ protected:
void type0_timeout_r(const uint32_t offset); void type0_timeout_r(const uint32_t offset);
void type0_timeout_w(const uint32_t offset); void type0_timeout_w(const uint32_t offset);
bool translate(uint32_t &addr); bool translate(uint32_t &addr);
void l2p_command(const std::vector<std::string> &params); void l2p_command(const std::vector<std::string_view> &params);
uint32_t vaddr_to_cache_line(uint32_t vaddr); uint32_t vaddr_to_cache_line(uint32_t vaddr);
enum enum

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ public:
debugger_commands(running_machine &machine, debugger_cpu &cpu, debugger_console &console); debugger_commands(running_machine &machine, debugger_cpu &cpu, debugger_console &console);
// validates a parameter as a boolean value // validates a parameter as a boolean value
bool validate_boolean_parameter(const std::string &param, bool &result); bool validate_boolean_parameter(std::string_view param, bool &result);
// validates a parameter as a numeric value // validates a parameter as a numeric value
bool validate_number_parameter(std::string_view param, u64 &result); bool validate_number_parameter(std::string_view param, u64 &result);
@ -90,7 +90,7 @@ private:
device_t &get_device_search_base(std::string_view &param); device_t &get_device_search_base(std::string_view &param);
device_t *get_cpu_by_index(u64 cpunum); device_t *get_cpu_by_index(u64 cpunum);
bool debug_command_parameter_expression(std::string_view param, parsed_expression &result); bool debug_command_parameter_expression(std::string_view param, parsed_expression &result);
bool debug_command_parameter_command(const char *param); bool debug_command_parameter_command(std::string_view param);
bool cheat_address_is_valid(address_space &space, offs_t address); bool cheat_address_is_valid(address_space &space, offs_t address);
@ -101,87 +101,87 @@ private:
bool mini_printf(std::ostream &stream, std::string_view format, int params, u64 *param); bool mini_printf(std::ostream &stream, std::string_view format, int params, u64 *param);
template <typename T> template <typename T>
void execute_index_command(std::vector<std::string> const &params, T &&apply, char const *unused_message); void execute_index_command(std::vector<std::string_view> const &params, T &&apply, char const *unused_message);
void execute_help(const std::vector<std::string> &params); void execute_help(const std::vector<std::string_view> &params);
void execute_print(const std::vector<std::string> &params); void execute_print(const std::vector<std::string_view> &params);
void execute_printf(const std::vector<std::string> &params); void execute_printf(const std::vector<std::string_view> &params);
void execute_logerror(const std::vector<std::string> &params); void execute_logerror(const std::vector<std::string_view> &params);
void execute_tracelog(const std::vector<std::string> &params); void execute_tracelog(const std::vector<std::string_view> &params);
void execute_tracesym(const std::vector<std::string> &params); void execute_tracesym(const std::vector<std::string_view> &params);
void execute_cls(const std::vector<std::string> &params); void execute_cls(const std::vector<std::string_view> &params);
void execute_quit(const std::vector<std::string> &params); void execute_quit(const std::vector<std::string_view> &params);
void execute_do(const std::vector<std::string> &params); void execute_do(const std::vector<std::string_view> &params);
void execute_step(const std::vector<std::string> &params); void execute_step(const std::vector<std::string_view> &params);
void execute_over(const std::vector<std::string> &params); void execute_over(const std::vector<std::string_view> &params);
void execute_out(const std::vector<std::string> &params); void execute_out(const std::vector<std::string_view> &params);
void execute_go(const std::vector<std::string> &params); void execute_go(const std::vector<std::string_view> &params);
void execute_go_vblank(const std::vector<std::string> &params); void execute_go_vblank(const std::vector<std::string_view> &params);
void execute_go_interrupt(const std::vector<std::string> &params); void execute_go_interrupt(const std::vector<std::string_view> &params);
void execute_go_exception(const std::vector<std::string> &params); void execute_go_exception(const std::vector<std::string_view> &params);
void execute_go_time(const std::vector<std::string> &params); void execute_go_time(const std::vector<std::string_view> &params);
void execute_go_privilege(const std::vector<std::string> &params); void execute_go_privilege(const std::vector<std::string_view> &params);
void execute_go_branch(bool sense, const std::vector<std::string> &params); void execute_go_branch(bool sense, const std::vector<std::string_view> &params);
void execute_go_next_instruction(const std::vector<std::string> &params); void execute_go_next_instruction(const std::vector<std::string_view> &params);
void execute_focus(const std::vector<std::string> &params); void execute_focus(const std::vector<std::string_view> &params);
void execute_ignore(const std::vector<std::string> &params); void execute_ignore(const std::vector<std::string_view> &params);
void execute_observe(const std::vector<std::string> &params); void execute_observe(const std::vector<std::string_view> &params);
void execute_suspend(const std::vector<std::string> &params); void execute_suspend(const std::vector<std::string_view> &params);
void execute_resume(const std::vector<std::string> &params); void execute_resume(const std::vector<std::string_view> &params);
void execute_next(const std::vector<std::string> &params); void execute_next(const std::vector<std::string_view> &params);
void execute_cpulist(const std::vector<std::string> &params); void execute_cpulist(const std::vector<std::string_view> &params);
void execute_time(const std::vector<std::string> &params); void execute_time(const std::vector<std::string_view> &params);
void execute_comment_add(const std::vector<std::string> &params); void execute_comment_add(const std::vector<std::string_view> &params);
void execute_comment_del(const std::vector<std::string> &params); void execute_comment_del(const std::vector<std::string_view> &params);
void execute_comment_save(const std::vector<std::string> &params); void execute_comment_save(const std::vector<std::string_view> &params);
void execute_comment_list(const std::vector<std::string> &params); void execute_comment_list(const std::vector<std::string_view> &params);
void execute_comment_commit(const std::vector<std::string> &params); void execute_comment_commit(const std::vector<std::string_view> &params);
void execute_bpset(const std::vector<std::string> &params); void execute_bpset(const std::vector<std::string_view> &params);
void execute_bpclear(const std::vector<std::string> &params); void execute_bpclear(const std::vector<std::string_view> &params);
void execute_bpdisenable(bool enable, const std::vector<std::string> &params); void execute_bpdisenable(bool enable, const std::vector<std::string_view> &params);
void execute_bplist(const std::vector<std::string> &params); void execute_bplist(const std::vector<std::string_view> &params);
void execute_wpset(int spacenum, const std::vector<std::string> &params); void execute_wpset(int spacenum, const std::vector<std::string_view> &params);
void execute_wpclear(const std::vector<std::string> &params); void execute_wpclear(const std::vector<std::string_view> &params);
void execute_wpdisenable(bool enable, const std::vector<std::string> &params); void execute_wpdisenable(bool enable, const std::vector<std::string_view> &params);
void execute_wplist(const std::vector<std::string> &params); void execute_wplist(const std::vector<std::string_view> &params);
void execute_rpset(const std::vector<std::string> &params); void execute_rpset(const std::vector<std::string_view> &params);
void execute_rpclear(const std::vector<std::string> &params); void execute_rpclear(const std::vector<std::string_view> &params);
void execute_rpdisenable(bool enable, const std::vector<std::string> &params); void execute_rpdisenable(bool enable, const std::vector<std::string_view> &params);
void execute_rplist(const std::vector<std::string> &params); void execute_rplist(const std::vector<std::string_view> &params);
void execute_statesave(const std::vector<std::string> &params); void execute_statesave(const std::vector<std::string_view> &params);
void execute_stateload(const std::vector<std::string> &params); void execute_stateload(const std::vector<std::string_view> &params);
void execute_rewind(const std::vector<std::string> &params); void execute_rewind(const std::vector<std::string_view> &params);
void execute_save(int spacenum, const std::vector<std::string> &params); void execute_save(int spacenum, const std::vector<std::string_view> &params);
void execute_saveregion(const std::vector<std::string> &params); void execute_saveregion(const std::vector<std::string_view> &params);
void execute_load(int spacenum, const std::vector<std::string> &params); void execute_load(int spacenum, const std::vector<std::string_view> &params);
void execute_loadregion(const std::vector<std::string> &params); void execute_loadregion(const std::vector<std::string_view> &params);
void execute_dump(int spacenum, const std::vector<std::string> &params); void execute_dump(int spacenum, const std::vector<std::string_view> &params);
void execute_strdump(int spacenum, const std::vector<std::string> &params); void execute_strdump(int spacenum, const std::vector<std::string_view> &params);
void execute_cheatrange(bool init, const std::vector<std::string> &params); void execute_cheatrange(bool init, const std::vector<std::string_view> &params);
void execute_cheatnext(bool initial, const std::vector<std::string> &params); void execute_cheatnext(bool initial, const std::vector<std::string_view> &params);
void execute_cheatlist(const std::vector<std::string> &params); void execute_cheatlist(const std::vector<std::string_view> &params);
void execute_cheatundo(const std::vector<std::string> &params); void execute_cheatundo(const std::vector<std::string_view> &params);
void execute_dasm(const std::vector<std::string> &params); void execute_dasm(const std::vector<std::string_view> &params);
void execute_find(int spacenum, const std::vector<std::string> &params); void execute_find(int spacenum, const std::vector<std::string_view> &params);
void execute_fill(int spacenum, const std::vector<std::string> &params); void execute_fill(int spacenum, const std::vector<std::string_view> &params);
void execute_trace(const std::vector<std::string> &params, bool trace_over); void execute_trace(const std::vector<std::string_view> &params, bool trace_over);
void execute_traceflush(const std::vector<std::string> &params); void execute_traceflush(const std::vector<std::string_view> &params);
void execute_history(const std::vector<std::string> &params); void execute_history(const std::vector<std::string_view> &params);
void execute_trackpc(const std::vector<std::string> &params); void execute_trackpc(const std::vector<std::string_view> &params);
void execute_trackmem(const std::vector<std::string> &params); void execute_trackmem(const std::vector<std::string_view> &params);
void execute_pcatmem(int spacenum, const std::vector<std::string> &params); void execute_pcatmem(int spacenum, const std::vector<std::string_view> &params);
void execute_snap(const std::vector<std::string> &params); void execute_snap(const std::vector<std::string_view> &params);
void execute_source(const std::vector<std::string> &params); void execute_source(const std::vector<std::string_view> &params);
void execute_map(int spacenum, const std::vector<std::string> &params); void execute_map(int spacenum, const std::vector<std::string_view> &params);
void execute_memdump(const std::vector<std::string> &params); void execute_memdump(const std::vector<std::string_view> &params);
void execute_symlist(const std::vector<std::string> &params); void execute_symlist(const std::vector<std::string_view> &params);
void execute_softreset(const std::vector<std::string> &params); void execute_softreset(const std::vector<std::string_view> &params);
void execute_hardreset(const std::vector<std::string> &params); void execute_hardreset(const std::vector<std::string_view> &params);
void execute_images(const std::vector<std::string> &params); void execute_images(const std::vector<std::string_view> &params);
void execute_mount(const std::vector<std::string> &params); void execute_mount(const std::vector<std::string_view> &params);
void execute_unmount(const std::vector<std::string> &params); void execute_unmount(const std::vector<std::string_view> &params);
void execute_input(const std::vector<std::string> &params); void execute_input(const std::vector<std::string_view> &params);
void execute_dumpkbd(const std::vector<std::string> &params); void execute_dumpkbd(const std::vector<std::string_view> &params);
running_machine& m_machine; running_machine& m_machine;
debugger_console& m_console; debugger_console& m_console;

View File

@ -133,7 +133,7 @@ inline bool debugger_console::debug_command::compare::operator()(const debug_com
} }
debugger_console::debug_command::debug_command(std::string_view _command, u32 _flags, int _minparams, int _maxparams, std::function<void (const std::vector<std::string> &)> &&_handler) debugger_console::debug_command::debug_command(std::string_view _command, u32 _flags, int _minparams, int _maxparams, std::function<void (const std::vector<std::string_view> &)> &&_handler)
: command(_command), params(nullptr), help(nullptr), handler(std::move(_handler)), flags(_flags), minparams(_minparams), maxparams(_maxparams) : command(_command), params(nullptr), help(nullptr), handler(std::move(_handler)), flags(_flags), minparams(_minparams), maxparams(_maxparams)
{ {
} }
@ -143,7 +143,7 @@ debugger_console::debug_command::debug_command(std::string_view _command, u32 _f
// execute_help_custom - execute the helpcustom command // execute_help_custom - execute the helpcustom command
//------------------------------------------------------------ //------------------------------------------------------------
void debugger_console::execute_help_custom(const std::vector<std::string> &params) void debugger_console::execute_help_custom(const std::vector<std::string_view> &params)
{ {
for (const debug_command &cmd : m_commandlist) for (const debug_command &cmd : m_commandlist)
{ {
@ -160,9 +160,9 @@ void debugger_console::execute_help_custom(const std::vector<std::string> &param
execute_condump - execute the condump command execute_condump - execute the condump command
------------------------------------------------------------*/ ------------------------------------------------------------*/
void debugger_console::execute_condump(const std::vector<std::string>& params) void debugger_console::execute_condump(const std::vector<std::string_view>& params)
{ {
std::string filename = params[0]; std::string filename(params[0]);
const char* mode; const char* mode;
/* replace macros */ /* replace macros */
@ -308,10 +308,7 @@ CMDERR debugger_console::internal_execute_command(bool execute, std::vector<std:
// execute the handler // execute the handler
if (execute) if (execute)
{ found->handler(params);
std::vector<std::string> params_vec(params.begin(), params.end());
found->handler(params_vec);
}
return CMDERR::none(); return CMDERR::none();
} }
@ -454,7 +451,7 @@ CMDERR debugger_console::validate_command(std::string_view command)
register_command - register a command handler register_command - register a command handler
-------------------------------------------------*/ -------------------------------------------------*/
void debugger_console::register_command(std::string_view command, u32 flags, int minparams, int maxparams, std::function<void (const std::vector<std::string> &)> &&handler) void debugger_console::register_command(std::string_view command, u32 flags, int minparams, int maxparams, std::function<void (const std::vector<std::string_view> &)> &&handler)
{ {
if (m_machine.phase() != machine_phase::INIT) if (m_machine.phase() != machine_phase::INIT)
throw emu_fatalerror("Can only call debugger_console::register_command() at init time!"); throw emu_fatalerror("Can only call debugger_console::register_command() at init time!");

View File

@ -83,7 +83,7 @@ public:
// command handling // command handling
CMDERR execute_command(std::string_view command, bool echo); CMDERR execute_command(std::string_view command, bool echo);
CMDERR validate_command(std::string_view command); CMDERR validate_command(std::string_view command);
void register_command(std::string_view command, u32 flags, int minparams, int maxparams, std::function<void (const std::vector<std::string> &)> &&handler); void register_command(std::string_view command, u32 flags, int minparams, int maxparams, std::function<void (const std::vector<std::string_view> &)> &&handler);
void source_script(const char *file); void source_script(const char *file);
void process_source_file(); void process_source_file();
@ -119,8 +119,8 @@ public:
private: private:
void exit(); void exit();
void execute_help_custom(const std::vector<std::string> &params); void execute_help_custom(const std::vector<std::string_view> &params);
void execute_condump(const std::vector<std::string>& params); void execute_condump(const std::vector<std::string_view>& params);
[[nodiscard]] static std::string_view trim_parameter(std::string_view param, bool keep_quotes); [[nodiscard]] static std::string_view trim_parameter(std::string_view param, bool keep_quotes);
CMDERR internal_execute_command(bool execute, std::vector<std::string_view> &params); CMDERR internal_execute_command(bool execute, std::vector<std::string_view> &params);
@ -131,7 +131,7 @@ private:
struct debug_command struct debug_command
{ {
debug_command(std::string_view _command, u32 _flags, int _minparams, int _maxparams, std::function<void (const std::vector<std::string> &)> &&_handler); debug_command(std::string_view _command, u32 _flags, int _minparams, int _maxparams, std::function<void (const std::vector<std::string_view> &)> &&_handler);
struct compare struct compare
{ {
@ -144,7 +144,7 @@ private:
std::string command; std::string command;
const char * params; const char * params;
const char * help; const char * help;
std::function<void (const std::vector<std::string> &)> handler; std::function<void (const std::vector<std::string_view> &)> handler;
u32 flags; u32 flags;
int minparams; int minparams;
int maxparams; int maxparams;

View File

@ -505,10 +505,10 @@ void natural_keyboard::post_utf8(const char *text, size_t length, const attotime
} }
void natural_keyboard::post_utf8(const std::string &text, const attotime &rate) void natural_keyboard::post_utf8(std::string_view text, const attotime &rate)
{ {
if (!text.empty()) if (!text.empty())
post_utf8(text.c_str(), text.size(), rate); post_utf8(text.data(), text.size(), rate);
} }
@ -590,10 +590,10 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim
} }
void natural_keyboard::post_coded(const std::string &text, const attotime &rate) void natural_keyboard::post_coded(std::string_view text, const attotime &rate)
{ {
if (!text.empty()) if (!text.empty())
post_coded(text.c_str(), text.size(), rate); post_coded(text.data(), text.size(), rate);
} }

View File

@ -16,6 +16,7 @@
#include <functional> #include <functional>
#include <iosfwd> #include <iosfwd>
#include <string> #include <string>
#include <string_view>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
@ -63,9 +64,9 @@ public:
void post_char(char32_t ch, bool normalize_crlf = false); void post_char(char32_t ch, bool normalize_crlf = false);
void post(const char32_t *text, size_t length = 0, const attotime &rate = attotime::zero); void post(const char32_t *text, size_t length = 0, const attotime &rate = attotime::zero);
void post_utf8(const char *text, size_t length = 0, const attotime &rate = attotime::zero); void post_utf8(const char *text, size_t length = 0, const attotime &rate = attotime::zero);
void post_utf8(const std::string &text, const attotime &rate = attotime::zero); void post_utf8(std::string_view text, const attotime &rate = attotime::zero);
void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero); void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero);
void post_coded(const std::string &text, const attotime &rate = attotime::zero); void post_coded(std::string_view text, const attotime &rate = attotime::zero);
void paste(); void paste();
// debugging // debugging

View File

@ -165,11 +165,11 @@ std::string strmakeupper(std::string_view str)
} }
/** /**
* @fn std::string &strmakelower(std::string_view str) * @fn std::string strmakelower(std::string_view str)
* *
* @brief Returns a lower case version of the given string. * @brief Returns a lower case version of the given string.
* *
* @param [in,out] str The string to make lower case * @param [in] str The string to make lower case
* *
* @return A new std::string having been changed to lower case * @return A new std::string having been changed to lower case
*/ */
@ -209,6 +209,40 @@ int strreplace(std::string &str, const std::string& search, const std::string& r
namespace util { namespace util {
/**
* @fn bool streqlower(std::string_view str, std::string_view lcstr)
*
* @brief Tests whether a mixed-case string matches a lowercase string.
*
* @param [in] str First string to compare (may be mixed-case).
* @param [in] lcstr Second string to compare (must be all lowercase).
*
* @return True if the strings match regardless of case.
*/
bool streqlower(std::string_view str, std::string_view lcstr)
{
return std::equal(str.begin(), str.end(), lcstr.begin(), lcstr.end(),
[] (unsigned char c1, unsigned char c2) { return std::tolower(c1) == c2; });
}
/**
* @fn bool strequpper(std::string_view str, std::string_view ucstr)
*
* @brief Tests whether a mixed-case string matches an uppercase string.
*
* @param [in] str First string to compare (may be mixed-case).
* @param [in] ucstr Second string to compare (must be all uppercase).
*
* @return True if the strings match regardless of case.
*/
bool strequpper(std::string_view str, std::string_view ucstr)
{
return std::equal(str.begin(), str.end(), ucstr.begin(), ucstr.end(),
[] (unsigned char c1, unsigned char c2) { return std::toupper(c1) == c2; });
}
/** /**
* @fn double edit_distance(std::u32string_view lhs, std::u32string_view rhs) * @fn double edit_distance(std::u32string_view lhs, std::u32string_view rhs)
* *

View File

@ -77,6 +77,9 @@ int strreplace(std::string &str, const std::string& search, const std::string& r
namespace util { namespace util {
bool strequpper(std::string_view str, std::string_view ucstr);
bool streqlower(std::string_view str, std::string_view lcstr);
// based on Jaro-Winkler distance - returns value from 0.0 (totally dissimilar) to 1.0 (identical) // based on Jaro-Winkler distance - returns value from 0.0 (totally dissimilar) to 1.0 (identical)
double edit_distance(std::u32string_view lhs, std::u32string_view rhs); double edit_distance(std::u32string_view lhs, std::u32string_view rhs);

View File

@ -371,10 +371,10 @@ private:
m_ata_int = param; m_ata_int = param;
} }
void debug_help_command(const std::vector<std::string> &params); void debug_help_command(const std::vector<std::string_view> &params);
void debug_commands(const std::vector<std::string> &params); void debug_commands(const std::vector<std::string_view> &params);
void dump_task_command(const std::vector<std::string> &params); void dump_task_command(const std::vector<std::string_view> &params);
}; };
@ -1485,7 +1485,7 @@ void konamim2_state::init_hellngt()
* *
*************************************/ *************************************/
void konamim2_state::debug_help_command(const std::vector<std::string> &params) void konamim2_state::debug_help_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -1494,7 +1494,7 @@ void konamim2_state::debug_help_command(const std::vector<std::string> &params)
con.printf(" konm2 dump_dspp,<address> -- Dump DSPP object at <address>\n"); con.printf(" konm2 dump_dspp,<address> -- Dump DSPP object at <address>\n");
} }
void konamim2_state::debug_commands(const std::vector<std::string> &params) void konamim2_state::debug_commands(const std::vector<std::string_view> &params)
{ {
if (params.size() < 1) if (params.size() < 1)
return; return;
@ -1507,7 +1507,7 @@ void konamim2_state::debug_commands(const std::vector<std::string> &params)
subdevice<dspp_device>("bda:dspp")->dump_state(); subdevice<dspp_device>("bda:dspp")->dump_state();
} }
void konamim2_state::dump_task_command(const std::vector<std::string> &params) void konamim2_state::dump_task_command(const std::vector<std::string_view> &params)
{ {
typedef uint32_t Item; typedef uint32_t Item;
typedef uint32_t m2ptr; typedef uint32_t m2ptr;

View File

@ -77,7 +77,7 @@ void midtunit_video_device::debug_init()
} }
} }
void midtunit_video_device::debug_commands(const std::vector<std::string> &params) void midtunit_video_device::debug_commands(const std::vector<std::string_view> &params)
{ {
if (params.size() < 1) if (params.size() < 1)
return; return;
@ -88,7 +88,7 @@ void midtunit_video_device::debug_commands(const std::vector<std::string> &param
debug_help_command(params); debug_help_command(params);
} }
void midtunit_video_device::debug_help_command(const std::vector<std::string> &params) void midtunit_video_device::debug_help_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -97,7 +97,7 @@ void midtunit_video_device::debug_help_command(const std::vector<std::string> &p
con.printf(" midblit help -- this list\n"); con.printf(" midblit help -- this list\n");
} }
void midtunit_video_device::debug_png_dma_command(const std::vector<std::string> &params) void midtunit_video_device::debug_png_dma_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -141,7 +141,7 @@ void midtunit_video_device::debug_png_dma_command(const std::vector<std::string>
return; return;
} }
strncpy(m_log_path, params[2].c_str(), 2047); m_log_path = params[2];
if (params.size() == 4) if (params.size() == 4)
{ {

View File

@ -165,16 +165,16 @@ protected:
int32_t m_debug_dma_command; int32_t m_debug_dma_command;
#endif #endif
char m_log_path[2048]; std::string m_log_path;
bool m_log_png; bool m_log_png;
bool m_log_json; bool m_log_json;
std::unique_ptr<uint64_t[]> m_logged_rom; std::unique_ptr<uint64_t[]> m_logged_rom;
bitmap_argb32 m_log_bitmap; bitmap_argb32 m_log_bitmap;
void debug_init(); void debug_init();
void debug_commands(const std::vector<std::string> &params); void debug_commands(const std::vector<std::string_view> &params);
void debug_help_command(const std::vector<std::string> &params); void debug_help_command(const std::vector<std::string_view> &params);
void debug_png_dma_command(const std::vector<std::string> &params); void debug_png_dma_command(const std::vector<std::string_view> &params);
void log_bitmap(int command, int bpp, bool skip); void log_bitmap(int command, int bpp, bool skip);
}; };

View File

@ -261,8 +261,8 @@ private:
void decode_dssi_f_plonk_char(uint16_t ds, uint16_t si); void decode_dssi_f_plonk_char(uint16_t ds, uint16_t si);
void decode_dssi_f_rw_sectors(uint16_t ds, uint16_t si); void decode_dssi_f_rw_sectors(uint16_t ds, uint16_t si);
void debug_command(const std::vector<std::string> &params); void debug_command(const std::vector<std::string_view> &params);
void video_debug(const std::vector<std::string> &params); void video_debug(const std::vector<std::string_view> &params);
offs_t dasm_override(std::ostream &stream, offs_t pc, const util::disasm_interface::data_buffer &opcodes, const util::disasm_interface::data_buffer &params); offs_t dasm_override(std::ostream &stream, offs_t pc, const util::disasm_interface::data_buffer &opcodes, const util::disasm_interface::data_buffer &params);
TIMER_CALLBACK_MEMBER(do_mouse); TIMER_CALLBACK_MEMBER(do_mouse);

View File

@ -64,6 +64,7 @@ chdman createhd -o ST125N.chd -chs 41921,1,1 -ss 512
#include "rmnimbus.h" #include "rmnimbus.h"
#include "debugger.h" #include "debugger.h"
#include "debug/debugcmd.h"
#include "debug/debugcon.h" #include "debug/debugcon.h"
#include "debug/debugcpu.h" #include "debug/debugcpu.h"
#include "imagedev/floppy.h" #include "imagedev/floppy.h"
@ -234,12 +235,13 @@ void rmnimbus_state::machine_start()
//m_fdc->overide_delays(64,m_fdc->get_cmd_delay()); //m_fdc->overide_delays(64,m_fdc->get_cmd_delay());
} }
void rmnimbus_state::debug_command(const std::vector<std::string> &params) void rmnimbus_state::debug_command(const std::vector<std::string_view> &params)
{ {
if (params.size() > 0) if (params.size() > 0)
{ {
int temp; uint64_t temp;
sscanf(params[0].c_str(), "%d", &temp); if (!machine().debugger().commands().validate_number_parameter(params[0], temp))
return;
m_debug_machine = temp; m_debug_machine = temp;
} }
else else

View File

@ -32,6 +32,7 @@
#include "rmnimbus.h" #include "rmnimbus.h"
#include "debugger.h" #include "debugger.h"
#include "debug/debugcmd.h"
#include "debug/debugcon.h" #include "debug/debugcon.h"
#include <functional> #include <functional>
@ -623,12 +624,13 @@ void rmnimbus_state::change_palette(uint8_t bank, uint16_t colours)
} }
} }
void rmnimbus_state::video_debug(const std::vector<std::string> &params) void rmnimbus_state::video_debug(const std::vector<std::string_view> &params)
{ {
if (params.size() > 0) if (params.size() > 0)
{ {
int temp; uint64_t temp;
sscanf(params[0].c_str(), "%d", &temp); if (!machine().debugger().commands().validate_number_parameter(params[0], temp))
return;
m_debug_video = temp; m_debug_video = temp;
} }
else else

View File

@ -663,9 +663,9 @@ private:
void chihiro_map_io(address_map &map); void chihiro_map_io(address_map &map);
void jamtable_disasm(address_space &space, uint32_t address, uint32_t size); void jamtable_disasm(address_space &space, uint32_t address, uint32_t size);
void jamtable_disasm_command(const std::vector<std::string> &params); void jamtable_disasm_command(const std::vector<std::string_view> &params);
void chihiro_help_command(const std::vector<std::string> &params); void chihiro_help_command(const std::vector<std::string_view> &params);
void debug_commands(const std::vector<std::string> &params); void debug_commands(const std::vector<std::string_view> &params);
}; };
/* jamtable instructions for Chihiro (different from Xbox console) /* jamtable instructions for Chihiro (different from Xbox console)
@ -780,7 +780,7 @@ void chihiro_state::jamtable_disasm(address_space &space, uint32_t address, uint
} }
} }
void chihiro_state::jamtable_disasm_command(const std::vector<std::string> &params) void chihiro_state::jamtable_disasm_command(const std::vector<std::string_view> &params)
{ {
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
uint64_t addr, size; uint64_t addr, size;
@ -794,7 +794,7 @@ void chihiro_state::jamtable_disasm_command(const std::vector<std::string> &para
jamtable_disasm(space, (uint32_t)addr, (uint32_t)size); jamtable_disasm(space, (uint32_t)addr, (uint32_t)size);
} }
void chihiro_state::chihiro_help_command(const std::vector<std::string> &params) void chihiro_state::chihiro_help_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -803,7 +803,7 @@ void chihiro_state::chihiro_help_command(const std::vector<std::string> &params)
con.printf(" chihiro help -- this list\n"); con.printf(" chihiro help -- this list\n");
} }
void chihiro_state::debug_commands(const std::vector<std::string> &params) void chihiro_state::debug_commands(const std::vector<std::string_view> &params)
{ {
if (params.size() < 1) if (params.size() < 1)
return; return;

View File

@ -249,10 +249,10 @@ protected:
void scsp_map(address_map &map); void scsp_map(address_map &map);
void debug_init(); void debug_init();
void debug_commands(const std::vector<std::string> &params); void debug_commands(const std::vector<std::string_view> &params);
void debug_geo_dasm_command(const std::vector<std::string> &params); void debug_geo_dasm_command(const std::vector<std::string_view> &params);
void debug_tri_dump_command(const std::vector<std::string> &params); void debug_tri_dump_command(const std::vector<std::string_view> &params);
void debug_help_command(const std::vector<std::string> &params); void debug_help_command(const std::vector<std::string_view> &params);
virtual void video_start() override; virtual void video_start() override;

View File

@ -25,7 +25,7 @@ void model2_state::debug_init()
} }
} }
void model2_state::debug_commands(const std::vector<std::string> &params) void model2_state::debug_commands(const std::vector<std::string_view> &params)
{ {
if (params.size() < 1) if (params.size() < 1)
return; return;
@ -38,7 +38,7 @@ void model2_state::debug_commands(const std::vector<std::string> &params)
debug_help_command(params); debug_help_command(params);
} }
void model2_state::debug_help_command(const std::vector<std::string> &params) void model2_state::debug_help_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -54,7 +54,7 @@ void model2_state::debug_help_command(const std::vector<std::string> &params)
* *
****************************************/ ****************************************/
void model2_state::debug_geo_dasm_command(const std::vector<std::string> &params) void model2_state::debug_geo_dasm_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -70,10 +70,11 @@ void model2_state::debug_geo_dasm_command(const std::vector<std::string> &params
return; return;
} }
std::ofstream f(params[1]); std::string fname(params[1]);
std::ofstream f(fname);
if (!f) if (!f)
{ {
con.printf("Error: while opening %s for writing\n",params[1].c_str()); con.printf("Error: while opening %s for writing\n", params[1]);
return; return;
} }
@ -264,7 +265,7 @@ void model2_state::debug_geo_dasm_command(const std::vector<std::string> &params
* *
****************************************/ ****************************************/
void model2_state::debug_tri_dump_command(const std::vector<std::string> &params) void model2_state::debug_tri_dump_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
FILE *f; FILE *f;
@ -281,9 +282,10 @@ void model2_state::debug_tri_dump_command(const std::vector<std::string> &params
return; return;
} }
if((f = fopen( params[1].c_str(), "w" )) == nullptr) std::string filename(params[1]);
if((f = fopen( filename.c_str(), "w" )) == nullptr)
{ {
con.printf("Error: while opening %s for writing\n",params[1].c_str()); con.printf("Error: while opening %s for writing\n", params[1]);
return; return;
} }

View File

@ -84,7 +84,7 @@ void xbox_base_state::find_debug_params()
} }
} }
void xbox_base_state::dump_string_command(const std::vector<std::string> &params) void xbox_base_state::dump_string_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -126,7 +126,7 @@ void xbox_base_state::dump_string_command(const std::vector<std::string> &params
con.printf("\n"); con.printf("\n");
} }
void xbox_base_state::dump_process_command(const std::vector<std::string> &params) void xbox_base_state::dump_process_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -156,7 +156,7 @@ void xbox_base_state::dump_process_command(const std::vector<std::string> &param
con.printf("_padding %d byte\n", space.read_byte(address + 27)); con.printf("_padding %d byte\n", space.read_byte(address + 27));
} }
void xbox_base_state::dump_list_command(const std::vector<std::string> &params) void xbox_base_state::dump_list_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -209,7 +209,7 @@ void xbox_base_state::dump_list_command(const std::vector<std::string> &params)
} }
} }
void xbox_base_state::dump_dpc_command(const std::vector<std::string> &params) void xbox_base_state::dump_dpc_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -238,7 +238,7 @@ void xbox_base_state::dump_dpc_command(const std::vector<std::string> &params)
con.printf("SystemArgument2 %08X dword\n", space.read_dword_unaligned(address + 24)); con.printf("SystemArgument2 %08X dword\n", space.read_dword_unaligned(address + 24));
} }
void xbox_base_state::dump_timer_command(const std::vector<std::string> &params) void xbox_base_state::dump_timer_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -269,7 +269,7 @@ void xbox_base_state::dump_timer_command(const std::vector<std::string> &params)
con.printf("Period %d dword\n", space.read_dword_unaligned(address + 36)); con.printf("Period %d dword\n", space.read_dword_unaligned(address + 36));
} }
void xbox_base_state::curthread_command(const std::vector<std::string> &params) void xbox_base_state::curthread_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -302,7 +302,7 @@ void xbox_base_state::curthread_command(const std::vector<std::string> &params)
con.printf("Current thread function is %08X\n", space.read_dword_unaligned(address)); con.printf("Current thread function is %08X\n", space.read_dword_unaligned(address));
} }
void xbox_base_state::threadlist_command(const std::vector<std::string> &params) void xbox_base_state::threadlist_command(const std::vector<std::string_view> &params)
{ {
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -341,7 +341,7 @@ void xbox_base_state::threadlist_command(const std::vector<std::string> &params)
} }
} }
void xbox_base_state::generate_irq_command(const std::vector<std::string> &params) void xbox_base_state::generate_irq_command(const std::vector<std::string_view> &params)
{ {
uint64_t irq; uint64_t irq;
@ -356,7 +356,7 @@ void xbox_base_state::generate_irq_command(const std::vector<std::string> &param
debug_generate_irq((int)irq, true); debug_generate_irq((int)irq, true);
} }
void xbox_base_state::nv2a_combiners_command(const std::vector<std::string> &params) void xbox_base_state::nv2a_combiners_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
bool en = nvidia_nv2a->toggle_register_combiners_usage(); bool en = nvidia_nv2a->toggle_register_combiners_usage();
@ -366,7 +366,7 @@ void xbox_base_state::nv2a_combiners_command(const std::vector<std::string> &par
con.printf("Register combiners disabled\n"); con.printf("Register combiners disabled\n");
} }
void xbox_base_state::nv2a_wclipping_command(const std::vector<std::string> &params) void xbox_base_state::nv2a_wclipping_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
bool en = nvidia_nv2a->toggle_clipping_w_support(); bool en = nvidia_nv2a->toggle_clipping_w_support();
@ -376,7 +376,7 @@ void xbox_base_state::nv2a_wclipping_command(const std::vector<std::string> &par
con.printf("W clipping disabled\n"); con.printf("W clipping disabled\n");
} }
void xbox_base_state::waitvblank_command(const std::vector<std::string> &params) void xbox_base_state::waitvblank_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
bool en = nvidia_nv2a->toggle_wait_vblank_support(); bool en = nvidia_nv2a->toggle_wait_vblank_support();
@ -386,7 +386,7 @@ void xbox_base_state::waitvblank_command(const std::vector<std::string> &params)
con.printf("Vblank method disabled\n"); con.printf("Vblank method disabled\n");
} }
void xbox_base_state::grab_texture_command(const std::vector<std::string> &params) void xbox_base_state::grab_texture_command(const std::vector<std::string_view> &params)
{ {
uint64_t type; uint64_t type;
@ -396,10 +396,11 @@ void xbox_base_state::grab_texture_command(const std::vector<std::string> &param
return; return;
if (params[2].empty() || params[2].length() > 127) if (params[2].empty() || params[2].length() > 127)
return; return;
nvidia_nv2a->debug_grab_texture((int)type, params[2].c_str()); std::string filename(params[2]);
nvidia_nv2a->debug_grab_texture((int)type, filename.c_str());
} }
void xbox_base_state::grab_vprog_command(const std::vector<std::string> &params) void xbox_base_state::grab_vprog_command(const std::vector<std::string_view> &params)
{ {
uint32_t instruction[4]; uint32_t instruction[4];
FILE *fil; FILE *fil;
@ -408,7 +409,8 @@ void xbox_base_state::grab_vprog_command(const std::vector<std::string> &params)
return; return;
if (params[1].empty() || params[1].length() > 127) if (params[1].empty() || params[1].length() > 127)
return; return;
if ((fil = fopen(params[1].c_str(), "wb")) == nullptr) std::string filename(params[1]);
if ((fil = fopen(filename.c_str(), "wb")) == nullptr)
return; return;
for (int n = 0; n < 136; n++) for (int n = 0; n < 136; n++)
{ {
@ -418,7 +420,7 @@ void xbox_base_state::grab_vprog_command(const std::vector<std::string> &params)
fclose(fil); fclose(fil);
} }
void xbox_base_state::vprogdis_command(const std::vector<std::string> &params) void xbox_base_state::vprogdis_command(const std::vector<std::string_view> &params)
{ {
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -470,7 +472,7 @@ void xbox_base_state::vprogdis_command(const std::vector<std::string> &params)
} }
} }
void xbox_base_state::vdeclaration_command(const std::vector<std::string> &params) void xbox_base_state::vdeclaration_command(const std::vector<std::string_view> &params)
{ {
address_space &space = m_maincpu->space(); address_space &space = m_maincpu->space();
@ -551,7 +553,7 @@ void xbox_base_state::vdeclaration_command(const std::vector<std::string> &param
} }
} }
void xbox_base_state::help_command(const std::vector<std::string> &params) void xbox_base_state::help_command(const std::vector<std::string_view> &params)
{ {
debugger_console &con = machine().debugger().console(); debugger_console &con = machine().debugger().console();
@ -574,7 +576,7 @@ void xbox_base_state::help_command(const std::vector<std::string> &params)
con.printf(" xbox help -- this list\n"); con.printf(" xbox help -- this list\n");
} }
void xbox_base_state::xbox_debug_commands(const std::vector<std::string> &params) void xbox_base_state::xbox_debug_commands(const std::vector<std::string_view> &params)
{ {
if (params.size() < 1) if (params.size() < 1)
return; return;

View File

@ -151,23 +151,23 @@ protected:
const debugger_constants *debugc_bios; const debugger_constants *debugc_bios;
private: private:
void dump_string_command(const std::vector<std::string> &params); void dump_string_command(const std::vector<std::string_view> &params);
void dump_process_command(const std::vector<std::string> &params); void dump_process_command(const std::vector<std::string_view> &params);
void dump_list_command(const std::vector<std::string> &params); void dump_list_command(const std::vector<std::string_view> &params);
void dump_dpc_command(const std::vector<std::string> &params); void dump_dpc_command(const std::vector<std::string_view> &params);
void dump_timer_command(const std::vector<std::string> &params); void dump_timer_command(const std::vector<std::string_view> &params);
void curthread_command(const std::vector<std::string> &params); void curthread_command(const std::vector<std::string_view> &params);
void threadlist_command(const std::vector<std::string> &params); void threadlist_command(const std::vector<std::string_view> &params);
void generate_irq_command(const std::vector<std::string> &params); void generate_irq_command(const std::vector<std::string_view> &params);
void nv2a_combiners_command(const std::vector<std::string> &params); void nv2a_combiners_command(const std::vector<std::string_view> &params);
void nv2a_wclipping_command(const std::vector<std::string> &params); void nv2a_wclipping_command(const std::vector<std::string_view> &params);
void waitvblank_command(const std::vector<std::string> &params); void waitvblank_command(const std::vector<std::string_view> &params);
void grab_texture_command(const std::vector<std::string> &params); void grab_texture_command(const std::vector<std::string_view> &params);
void grab_vprog_command(const std::vector<std::string> &params); void grab_vprog_command(const std::vector<std::string_view> &params);
void vprogdis_command(const std::vector<std::string> &params); void vprogdis_command(const std::vector<std::string_view> &params);
void vdeclaration_command(const std::vector<std::string> &params); void vdeclaration_command(const std::vector<std::string_view> &params);
void help_command(const std::vector<std::string> &params); void help_command(const std::vector<std::string_view> &params);
void xbox_debug_commands(const std::vector<std::string> &params); void xbox_debug_commands(const std::vector<std::string_view> &params);
int find_bios_index(); int find_bios_index();
bool find_bios_hash(int bios, uint32_t &crc32); bool find_bios_hash(int bios, uint32_t &crc32);
void find_debug_params(); void find_debug_params();

View File

@ -632,7 +632,7 @@ protected:
void dma_transfer_write(); void dma_transfer_write();
void dma_transfer_read(); void dma_transfer_read();
void fcodes_command(int ref, const std::vector<std::string> &params); void fcodes_command(int ref, const std::vector<std::string_view> &params);
}; };
class sun4_state : public sun4_base_state class sun4_state : public sun4_base_state
@ -690,10 +690,10 @@ void sun4_base_state::debugger_w(offs_t offset, uint32_t data, uint32_t mem_mask
m_mmu->insn_data_w<sun4_mmu_base_device::SUPER_INSN>(offset, data, mem_mask); m_mmu->insn_data_w<sun4_mmu_base_device::SUPER_INSN>(offset, data, mem_mask);
} }
void sun4_base_state::fcodes_command(int ref, const std::vector<std::string> &params) void sun4_base_state::fcodes_command(int ref, const std::vector<std::string_view> &params)
{ {
#if SUN4_LOG_FCODES #if SUN4_LOG_FCODES
if (params < 1) if (params.length() < 1)
return; return;
bool is_on = (params[0] == "on"); bool is_on = (params[0] == "on");

View File

@ -228,8 +228,8 @@ private:
void dgnbeta_map(address_map &map); void dgnbeta_map(address_map &map);
void execute_beta_key_dump(const std::vector<std::string> &params); void execute_beta_key_dump(const std::vector<std::string_view> &params);
void execute_beta_dat_log(const std::vector<std::string> &params); void execute_beta_dat_log(const std::vector<std::string_view> &params);
}; };
#endif // MAME_INCLUDES_DGN_BETA_H #endif // MAME_INCLUDES_DGN_BETA_H

View File

@ -822,14 +822,14 @@ offs_t dgn_beta_state::dgnbeta_dasm_override(std::ostream &stream, offs_t pc, co
return coco_state::os9_dasm_override(stream, pc, opcodes, params); return coco_state::os9_dasm_override(stream, pc, opcodes, params);
} }
void dgn_beta_state::execute_beta_dat_log(const std::vector<std::string> &params) void dgn_beta_state::execute_beta_dat_log(const std::vector<std::string_view> &params)
{ {
m_LogDatWrites = !m_LogDatWrites; m_LogDatWrites = !m_LogDatWrites;
machine().debugger().console().printf("DAT register write info set : %d\n", m_LogDatWrites); machine().debugger().console().printf("DAT register write info set : %d\n", m_LogDatWrites);
} }
void dgn_beta_state::execute_beta_key_dump(const std::vector<std::string> &params) void dgn_beta_state::execute_beta_key_dump(const std::vector<std::string_view> &params)
{ {
for (int idx = 0; idx < NoKeyrows; idx++) for (int idx = 0; idx < NoKeyrows; idx++)
{ {