mirror of
https://github.com/holub/mame
synced 2025-04-07 09:06:28 +03:00
debugger: Extended target address syntax to include device/address space. (#8630)
Added a validity check to ensure address space names are tag-like and unique, since they're now used as identifiers in debugger commands. Extended the syntax for target addresses to allow them to be qualified with a colon followed by an optional device tag and/or address space name. If only the device needs to be specified, a debugger CPU number may also be used. This makes commands like bpset and wpset more flexible, as they can operate on CPUs other than the currently visible CPU. Commands like find, fill, dump and load are more flexible as they can access any space of any device. Removed now-redundant CPU parameters from many commands, and renamed pcatmemp to pcatmem for consistency with other commands. Extended region syntax for saver/loadr to support tags relative to the visible CPU (e.g. you can use "." for the region with the same name as the visible CPU, or "^sibling" syntax). Added an optional root device parameter to memdump. Changed interpretation of Boolean values to support numeric expressions as well as true/false strings and literal 1/0. Added checks that the specified device is CPU-like to various commands that require a CPU (e.g. focus). Previously these commands would crash or trigger an assertion failure if a tag for a non-CPU devices was specified. Fixed the cpunum symbol so it uses the same rules for determining what is or isn't a CPU as parameter parsing. Made device_t sanitise subtags better. Previously you could cause an assertion failure or crash MAME by giving it unexpected relative tags via Lua or the debugger. Added help topic alias support, and reworked the data structures to improve the performance of looking up debugger commands and help topics. Removed the "ref" parameter from debugger command functions (std::bind can hold extra argument values for you if you need them). Also added an error message if duplicate debugger commands are registered. Updated help for commands that changed syntax, and also updated summaries for some commands that had changed in the past without corresponding help updates.
This commit is contained in:
parent
6eee76c1a0
commit
360d3a5950
@ -133,7 +133,7 @@ ABBREVIATE_BRIEF =
|
||||
# description.
|
||||
# The default value is: NO.
|
||||
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
|
||||
# inherited members of a class in the documentation of that class as if those
|
||||
@ -318,7 +318,7 @@ OPTIMIZE_OUTPUT_SLICE = NO
|
||||
#
|
||||
# Note see also the list of default file extension mappings.
|
||||
|
||||
EXTENSION_MAPPING = h=C++ inc=C++
|
||||
EXTENSION_MAPPING = inc=C++
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
@ -1156,7 +1156,7 @@ HTML_FILE_EXTENSION = .html
|
||||
# of the possible markers and block names see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_HEADER = doxygen/header.html
|
||||
#HTML_HEADER = doxygen/header.html
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
|
||||
# generated HTML page. If the tag is left blank doxygen will generate a standard
|
||||
@ -1166,7 +1166,7 @@ HTML_HEADER = doxygen/header.html
|
||||
# that doxygen normally uses.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FOOTER = doxygen/footer.html
|
||||
#HTML_FOOTER = doxygen/footer.html
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
|
||||
# sheet that is used by each HTML page. It can be used to fine-tune the look of
|
||||
@ -1191,7 +1191,7 @@ HTML_STYLESHEET =
|
||||
# list). For an example see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_STYLESHEET = doxygen/style.css
|
||||
#HTML_EXTRA_STYLESHEET = doxygen/style.css
|
||||
|
||||
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the HTML output directory. Note
|
||||
@ -1201,7 +1201,7 @@ HTML_EXTRA_STYLESHEET = doxygen/style.css
|
||||
# files will be copied as-is; there are no commands or markers available.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_FILES = doxygen/doxy-boot.js
|
||||
#HTML_EXTRA_FILES = doxygen/doxy-boot.js
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
@ -2330,7 +2330,7 @@ DOT_FONTPATH =
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CLASS_GRAPH = NO
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
|
||||
# graph for each documented class showing the direct and indirect implementation
|
||||
@ -2339,7 +2339,7 @@ CLASS_GRAPH = NO
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
COLLABORATION_GRAPH = NO
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
|
||||
# groups, showing the direct groups dependencies.
|
||||
|
@ -68,7 +68,7 @@ gio64_device::gio64_device(const machine_config &mconfig, const char *tag, devic
|
||||
gio64_device::gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_space_config("GIO64 Space", ENDIANNESS_BIG, 64, 32, 0)
|
||||
, m_space_config("gio64", ENDIANNESS_BIG, 64, 32, 0)
|
||||
, m_interrupt_cb(*this)
|
||||
{
|
||||
}
|
||||
|
@ -107,10 +107,10 @@ isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_
|
||||
isa8_device::isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, type, tag, owner, clock),
|
||||
device_memory_interface(mconfig, *this),
|
||||
m_mem_config("ISA 8-bit mem", ENDIANNESS_LITTLE, 8, 24, 0, address_map_constructor()),
|
||||
m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor()),
|
||||
m_mem16_config("ISA 16-bit mem", ENDIANNESS_LITTLE, 16, 24, 0, address_map_constructor()),
|
||||
m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor()),
|
||||
m_mem_config("mem8", ENDIANNESS_LITTLE, 8, 24, 0, address_map_constructor()),
|
||||
m_io_config("io8", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor()),
|
||||
m_mem16_config("mem16", ENDIANNESS_LITTLE, 16, 24, 0, address_map_constructor()),
|
||||
m_io16_config("io16", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor()),
|
||||
m_memspace(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_iospace(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_memwidth(0),
|
||||
|
@ -90,7 +90,7 @@ qbus_device::qbus_device(const machine_config &mconfig, const char *tag, device_
|
||||
device_t(mconfig, QBUS, tag, owner, clock),
|
||||
device_memory_interface(mconfig, *this),
|
||||
device_z80daisy_interface(mconfig, *this),
|
||||
m_program_config("QBUS A18", ENDIANNESS_BIG, 16, 16, 0, address_map_constructor()),
|
||||
m_program_config("a18", ENDIANNESS_BIG, 16, 16, 0, address_map_constructor()),
|
||||
m_space(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_out_birq4_cb(*this),
|
||||
m_out_birq5_cb(*this),
|
||||
|
@ -83,7 +83,7 @@ sbus_device::sbus_device(const machine_config &mconfig, const char *tag, device_
|
||||
sbus_device::sbus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_space_config("SBus Space", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor())
|
||||
, m_space_config("sbus", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor())
|
||||
, m_maincpu(*this, finder_base::DUMMY_TAG)
|
||||
, m_type1space(*this, finder_base::DUMMY_TAG, -1)
|
||||
, m_irq_cb(*this)
|
||||
|
@ -211,7 +211,7 @@ vme_device::vme_device(const machine_config &mconfig, const char *tag, device_t
|
||||
vme_device::vme_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_a32_config("VME A32", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor())
|
||||
, m_a32_config("a32", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor())
|
||||
, m_allocspaces(true)
|
||||
, m_cputag("maincpu")
|
||||
{
|
||||
|
@ -275,7 +275,7 @@ adsp2115_device::adsp2115_device(const machine_config &mconfig, const char *tag,
|
||||
|
||||
adsp2181_device::adsp2181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: adsp21xx_device(mconfig, ADSP2181, tag, owner, clock, CHIP_TYPE_ADSP2181)
|
||||
, m_io_config("I/O", ENDIANNESS_LITTLE, 16, 11, -1)
|
||||
, m_io_config("io", ENDIANNESS_LITTLE, 16, 11, -1)
|
||||
{ }
|
||||
|
||||
|
||||
|
@ -841,17 +841,17 @@ bool arm7_cpu_device::translate_vaddr_to_paddr(offs_t &vaddr, const int flags)
|
||||
}
|
||||
}
|
||||
|
||||
void arm7_cpu_device::translate_insn_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void arm7_cpu_device::translate_insn_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
translate_command(ref, params, TRANSLATE_FETCH);
|
||||
translate_command(params, TRANSLATE_FETCH);
|
||||
}
|
||||
|
||||
void arm7_cpu_device::translate_data_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void arm7_cpu_device::translate_data_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
translate_command(ref, params, TRANSLATE_READ);
|
||||
translate_command(params, TRANSLATE_READ);
|
||||
}
|
||||
|
||||
void arm7_cpu_device::translate_command(int ref, const std::vector<std::string> ¶ms, int intention)
|
||||
void arm7_cpu_device::translate_command(const std::vector<std::string> ¶ms, int intention)
|
||||
{
|
||||
uint64_t vaddr;
|
||||
|
||||
@ -1024,8 +1024,8 @@ void arm7_cpu_device::device_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("translate_insn", CMDFLAG_NONE, 0, 1, 1, std::bind(&arm7_cpu_device::translate_insn_command, this, _1, _2));
|
||||
machine().debugger().console().register_command("translate_data", CMDFLAG_NONE, 0, 1, 1, std::bind(&arm7_cpu_device::translate_data_command, this, _1, _2));
|
||||
machine().debugger().console().register_command("translate_insn", CMDFLAG_NONE, 1, 1, std::bind(&arm7_cpu_device::translate_insn_command, this, _1));
|
||||
machine().debugger().console().register_command("translate_data", CMDFLAG_NONE, 1, 1, std::bind(&arm7_cpu_device::translate_data_command, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,9 +146,9 @@ protected:
|
||||
|
||||
uint32_t m_r[/*NUM_REGS*/37];
|
||||
|
||||
void translate_insn_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void translate_data_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void translate_command(int ref, const std::vector<std::string> ¶ms, int intention);
|
||||
void translate_insn_command(const std::vector<std::string> ¶ms);
|
||||
void translate_data_command(const std::vector<std::string> ¶ms);
|
||||
void translate_command(const std::vector<std::string> ¶ms, int intention);
|
||||
|
||||
void update_insn_prefetch(uint32_t curr_pc);
|
||||
bool insn_fetch_thumb(uint32_t pc, uint32_t &out_insn);
|
||||
|
@ -19,7 +19,7 @@ hd641016_device::hd641016_device(const machine_config &mconfig, const char *tag,
|
||||
: cpu_device(mconfig, HD641016, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_BIG, 16, 24, 0)
|
||||
, m_data_config("data", ENDIANNESS_BIG, 32, 10, 0, address_map_constructor(FUNC(hd641016_device::ram_map), this))
|
||||
, m_io_config("I/O", ENDIANNESS_BIG, 32, 9, 0, address_map_constructor(FUNC(hd641016_device::io_map), this))
|
||||
, m_io_config("io", ENDIANNESS_BIG, 32, 9, 0, address_map_constructor(FUNC(hd641016_device::io_map), this))
|
||||
, m_pc(0)
|
||||
, m_ssp(0)
|
||||
, m_bsp(0)
|
||||
|
@ -15,7 +15,7 @@
|
||||
h8500_device::h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, int buswidth, int ramsize, int defmode, address_map_constructor map)
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_BIG, buswidth, addrbits, 0, map)
|
||||
, m_ram_config("internal RAM", ENDIANNESS_BIG, 16, ramsize, 0, address_map_constructor(FUNC(h8500_device::ram_map), this))
|
||||
, m_ram_config("intram", ENDIANNESS_BIG, 16, ramsize, 0, address_map_constructor(FUNC(h8500_device::ram_map), this))
|
||||
, m_mode_control(defmode)
|
||||
, m_pc(0)
|
||||
, m_ppc(0)
|
||||
|
@ -34,7 +34,7 @@ r65c19_device::r65c19_device(const machine_config &mconfig, const char *tag, dev
|
||||
c39_device::c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map)
|
||||
: r65c19_device(mconfig, type, tag, owner, clock, internal_map)
|
||||
, m_exp_config("expansion", ENDIANNESS_LITTLE, 8, 21, 0)
|
||||
, m_es4_config("ES4", ENDIANNESS_LITTLE, 8, 9, 0)
|
||||
, m_es4_config("es4", ENDIANNESS_LITTLE, 8, 9, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2318,7 +2318,7 @@ m68000_base_device::m68000_base_device(const machine_config &mconfig, const char
|
||||
: cpu_device(mconfig, type, tag, owner, clock),
|
||||
m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map),
|
||||
m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map),
|
||||
m_cpu_space_config("cpu space", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, address_map_constructor(FUNC(m68000_base_device::default_autovectors_map), this)),
|
||||
m_cpu_space_config("cpu_space", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, address_map_constructor(FUNC(m68000_base_device::default_autovectors_map), this)),
|
||||
m_interrupt_mixer(true),
|
||||
m_cpu_space_id(AS_CPU_SPACE),
|
||||
m_reset_instr_callback(*this),
|
||||
@ -2335,7 +2335,7 @@ m68000_base_device::m68000_base_device(const machine_config &mconfig, const char
|
||||
: cpu_device(mconfig, type, tag, owner, clock),
|
||||
m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits),
|
||||
m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits),
|
||||
m_cpu_space_config("cpu space", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, address_map_constructor(FUNC(m68000_base_device::default_autovectors_map), this)),
|
||||
m_cpu_space_config("cpu_space", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, address_map_constructor(FUNC(m68000_base_device::default_autovectors_map), this)),
|
||||
m_interrupt_mixer(true),
|
||||
m_cpu_space_id(AS_CPU_SPACE),
|
||||
m_reset_instr_callback(*this),
|
||||
|
@ -94,7 +94,15 @@ static const u32 size_mask[] = { 0x000000ffU, 0x0000ffffU, 0x00000000U, 0xffffff
|
||||
template <int Width>ns32000_device<Width>::ns32000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int databits, int addrbits)
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_interrupt_config("interrupt", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_iam_config("iam", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_iac_config("iac", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_eim_config("eim", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_eic_config("eic", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_sif_config("sif", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_nif_config("nif", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_odt_config("odt", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_rmw_config("rmw", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_ear_config("ear", ENDIANNESS_LITTLE, databits, addrbits, 0)
|
||||
, m_fpu(*this, finder_base::DUMMY_TAG)
|
||||
, m_mmu(*this, finder_base::DUMMY_TAG)
|
||||
, m_icount(0)
|
||||
@ -3327,15 +3335,15 @@ template <int Width> device_memory_interface::space_config_vector ns32000_device
|
||||
return space_config_vector{
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
|
||||
std::make_pair(ST_IAM, &m_interrupt_config),
|
||||
std::make_pair(ST_IAC, &m_interrupt_config),
|
||||
std::make_pair(ST_EIM, &m_interrupt_config),
|
||||
std::make_pair(ST_EIC, &m_interrupt_config),
|
||||
std::make_pair(ST_SIF, &m_program_config),
|
||||
std::make_pair(ST_NIF, &m_program_config),
|
||||
std::make_pair(ST_ODT, &m_program_config),
|
||||
std::make_pair(ST_RMW, &m_program_config),
|
||||
std::make_pair(ST_EAR, &m_program_config),
|
||||
std::make_pair(ST_IAM, &m_iam_config),
|
||||
std::make_pair(ST_IAC, &m_iac_config),
|
||||
std::make_pair(ST_EIM, &m_eim_config),
|
||||
std::make_pair(ST_EIC, &m_eic_config),
|
||||
std::make_pair(ST_SIF, &m_sif_config),
|
||||
std::make_pair(ST_NIF, &m_nif_config),
|
||||
std::make_pair(ST_ODT, &m_odt_config),
|
||||
std::make_pair(ST_RMW, &m_rmw_config),
|
||||
std::make_pair(ST_EAR, &m_ear_config),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,15 @@ protected:
|
||||
private:
|
||||
// configuration
|
||||
address_space_config m_program_config;
|
||||
address_space_config m_interrupt_config;
|
||||
address_space_config m_iam_config;
|
||||
address_space_config m_iac_config;
|
||||
address_space_config m_eim_config;
|
||||
address_space_config m_eic_config;
|
||||
address_space_config m_sif_config;
|
||||
address_space_config m_nif_config;
|
||||
address_space_config m_odt_config;
|
||||
address_space_config m_rmw_config;
|
||||
address_space_config m_ear_config;
|
||||
|
||||
optional_device<ns32000_slave_interface> m_fpu;
|
||||
optional_device<ns32000_mmu_interface> m_mmu;
|
||||
|
@ -168,8 +168,8 @@ hd6120_device::hd6120_device(const machine_config &config, const char *tag, devi
|
||||
: cpu_device(config, HD6120, tag, owner, clock)
|
||||
, m_inst_config("instruction", ENDIANNESS_BIG, 16, 16, -1) // 12 data bits
|
||||
, m_data_config("data", ENDIANNESS_BIG, 16, 16, -1) // 12 data bits
|
||||
, m_io_config("I/O", ENDIANNESS_BIG, 16, 9, -1) // 12 data bits
|
||||
, m_devctl_config("device control", ENDIANNESS_BIG, 8, 9, 0) // only 3 bits used
|
||||
, m_io_config("io", ENDIANNESS_BIG, 16, 9, -1) // 12 data bits
|
||||
, m_devctl_config("devctl", ENDIANNESS_BIG, 8, 9, 0) // only 3 bits used
|
||||
, m_lxmar_callback(*this)
|
||||
, m_lxpar_callback(*this)
|
||||
, m_lxdar_callback(*this)
|
||||
|
@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(RX01_CPU, rx01_cpu_device, "rx01_cpu", "DEC RX01 CPU")
|
||||
rx01_cpu_device::rx01_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: cpu_device(mconfig, RX01_CPU, tag, owner, clock)
|
||||
, m_inst_config("program", ENDIANNESS_LITTLE, 8, 12, 0)
|
||||
, m_data_config("sector data", ENDIANNESS_LITTLE, 8, 10, 0) // actually 1 bit wide
|
||||
, m_data_config("sectordata", ENDIANNESS_LITTLE, 8, 10, 0) // actually 1 bit wide
|
||||
, m_interface_callback(*this)
|
||||
, m_pc(0)
|
||||
, m_ppc(0)
|
||||
|
@ -45,12 +45,11 @@ sparc_base_device::sparc_base_device(const machine_config &mconfig, device_type
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_mmu(*this, finder_base::DUMMY_TAG)
|
||||
{
|
||||
char asi_buf[10];
|
||||
m_debugger_config = address_space_config("debug", ENDIANNESS_BIG, 32, 32);
|
||||
for (int i = 0; i < 0x10; i++)
|
||||
{
|
||||
snprintf(asi_buf, std::size(asi_buf), "asi%X", i);
|
||||
m_asi_config[i] = address_space_config(asi_buf, ENDIANNESS_BIG, 32, 32);
|
||||
m_asi_names[i] = util::string_format("asi%x", i);
|
||||
m_asi_config[i] = address_space_config(m_asi_names[i].c_str(), ENDIANNESS_BIG, 32, 32);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,7 @@ protected:
|
||||
required_device<sparc_mmu_interface> m_mmu;
|
||||
|
||||
// address spaces
|
||||
std::string m_asi_names[0x10];
|
||||
address_space_config m_debugger_config;
|
||||
address_space_config m_asi_config[0x10];
|
||||
memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_asi[0x20];
|
||||
|
@ -26,9 +26,9 @@ DEFINE_DEVICE_TYPE(UPD78053, upd78053_device, "upd78053", "NEC uPD78053")
|
||||
upd78k0_device::upd78k0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 iram_size, address_map_constructor mem_map, address_map_constructor sfr_map)
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, mem_map)
|
||||
, m_iram_config("internal high-speed RAM", ENDIANNESS_LITTLE, 16, iram_size > 0x200 ? 10 : iram_size > 0x100 ? 9 : 8, 0,
|
||||
, m_iram_config("iram", ENDIANNESS_LITTLE, 16, iram_size > 0x200 ? 10 : iram_size > 0x100 ? 9 : 8, 0,
|
||||
address_map_constructor(FUNC(upd78k0_device::iram_map), this))
|
||||
, m_sfr_config("SFR", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
|
||||
, m_sfr_config("sfr", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
|
||||
, m_iram_size(iram_size)
|
||||
, m_subclock(0)
|
||||
, m_pc(0)
|
||||
|
@ -27,8 +27,8 @@ DEFINE_DEVICE_TYPE(UPD78213, upd78213_device, "upd78213", "NEC uPD78213")
|
||||
upd78k2_device::upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map)
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, mem_map)
|
||||
, m_iram_config("IRAM", ENDIANNESS_LITTLE, 16, iram_bits, 0, address_map_constructor(FUNC(upd78k2_device::iram_map), this))
|
||||
, m_sfr_config("SFR", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
|
||||
, m_iram_config("iram", ENDIANNESS_LITTLE, 16, iram_bits, 0, address_map_constructor(FUNC(upd78k2_device::iram_map), this))
|
||||
, m_sfr_config("sfr", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
|
||||
, m_iram_addrmask((offs_t(1) << iram_bits) - 1)
|
||||
, m_pc(0)
|
||||
, m_ppc(0)
|
||||
|
@ -27,8 +27,8 @@ DEFINE_DEVICE_TYPE(UPD78312, upd78312_device, "upd78312", "NEC uPD78312")
|
||||
upd78k3_device::upd78k3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map)
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, mem_map)
|
||||
, m_iram_config("IRAM", ENDIANNESS_LITTLE, 16, 8, 0, address_map_constructor(FUNC(upd78k3_device::iram_map), this))
|
||||
, m_sfr_config("SFR", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
|
||||
, m_iram_config("iram", ENDIANNESS_LITTLE, 16, 8, 0, address_map_constructor(FUNC(upd78k3_device::iram_map), this))
|
||||
, m_sfr_config("sfr", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
|
||||
, m_iram(*this, "iram")
|
||||
, m_pc(0)
|
||||
, m_ppc(0)
|
||||
|
@ -22,7 +22,7 @@ vt61_cpu_device::vt61_cpu_device(const machine_config &mconfig, const char *tag,
|
||||
: cpu_device(mconfig, VT61_CPU, tag, owner, clock)
|
||||
, m_program_config("microprogram", ENDIANNESS_LITTLE, 16, 10, -1)
|
||||
, m_memory_config("memory", ENDIANNESS_LITTLE, 8, 16, 0)
|
||||
, m_idr_config("IDR", ENDIANNESS_LITTLE, 8, 6, 0)
|
||||
, m_idr_config("idr", ENDIANNESS_LITTLE, 8, 6, 0)
|
||||
, m_time_state(state::T1)
|
||||
, m_pc(0)
|
||||
, m_pc_mode(pc_mode::CLR)
|
||||
|
@ -36,10 +36,10 @@ z8002_device::z8002_device(const machine_config &mconfig, device_type type, cons
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_program_config("program", ENDIANNESS_BIG, 16, addrbits, 0)
|
||||
, m_data_config("data", ENDIANNESS_BIG, 16, addrbits, 0)
|
||||
, m_io_config("I/O", ENDIANNESS_BIG, 16, 16, 0)
|
||||
, m_opcodes_config("first word", ENDIANNESS_BIG, 16, addrbits, 0)
|
||||
, m_io_config("io_std", ENDIANNESS_BIG, 16, 16, 0)
|
||||
, m_opcodes_config("first_word", ENDIANNESS_BIG, 16, addrbits, 0)
|
||||
, m_stack_config("stack", ENDIANNESS_BIG, 16, addrbits, 0)
|
||||
, m_sio_config("special I/O", ENDIANNESS_BIG, 16, 16, 0)
|
||||
, m_sio_config("io_spc", ENDIANNESS_BIG, 16, 16, 0)
|
||||
, m_iack_in(*this)
|
||||
, m_mo_out(*this)
|
||||
, m_ppc(0), m_pc(0), m_psapseg(0), m_psapoff(0), m_fcw(0), m_refresh(0), m_nspseg(0), m_nspoff(0), m_irq_req(0), m_irq_vec(0), m_op_valid(0), m_nmi_state(0), m_mi(0), m_halt(false), m_icount(0)
|
||||
|
@ -32,7 +32,7 @@ acorn_memc_device::acorn_memc_device(const machine_config &mconfig, const char *
|
||||
: device_t(mconfig, ACORN_MEMC, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_vidc(*this, finder_base::DUMMY_TAG)
|
||||
, m_space_config("MEMC", ENDIANNESS_LITTLE, 32, 26, 0)
|
||||
, m_space_config("memc", ENDIANNESS_LITTLE, 32, 26, 0)
|
||||
, m_abort_w(*this)
|
||||
, m_sirq_w(*this)
|
||||
, m_output_dram_rowcol(false)
|
||||
@ -51,7 +51,7 @@ device_memory_interface::space_config_vector acorn_memc_device::memory_space_con
|
||||
};
|
||||
}
|
||||
|
||||
void acorn_memc_device::memc_map_debug_commands(int ref, const std::vector<std::string> ¶ms)
|
||||
void acorn_memc_device::memc_map_debug_commands(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
uint64_t offset;
|
||||
if (params.size() != 1 || !machine().debugger().commands().validate_number_parameter(params[0], offset))
|
||||
@ -103,7 +103,7 @@ void acorn_memc_device::device_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("memc_map", CMDFLAG_NONE, 0, 1, 1, std::bind(&acorn_memc_device::memc_map_debug_commands, this, _1, _2));
|
||||
machine().debugger().console().register_command("memc_map", CMDFLAG_NONE, 1, 1, std::bind(&acorn_memc_device::memc_map_debug_commands, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ protected:
|
||||
virtual space_config_vector memory_space_config() const override;
|
||||
|
||||
private:
|
||||
void memc_map_debug_commands(int ref, const std::vector<std::string> ¶ms);
|
||||
void memc_map_debug_commands(const std::vector<std::string> ¶ms);
|
||||
uint32_t dram_address(uint32_t address);
|
||||
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);
|
||||
|
@ -151,7 +151,7 @@ void sun4_mmu_base_device::device_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("l2p", CMDFLAG_NONE, 0, 1, 1, std::bind(&sun4_mmu_base_device::l2p_command, this, _1, _2));
|
||||
machine().debugger().console().register_command("l2p", CMDFLAG_NONE, 1, 1, std::bind(&sun4_mmu_base_device::l2p_command, this, _1));
|
||||
}
|
||||
|
||||
m_cache_word_size = m_cache_line_size >> 2;
|
||||
@ -985,7 +985,7 @@ bool sun4_mmu_base_device::translate(uint32_t &addr)
|
||||
return entry.valid;
|
||||
}
|
||||
|
||||
void sun4_mmu_base_device::l2p_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void sun4_mmu_base_device::l2p_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
uint64_t addr, offset;
|
||||
|
||||
|
@ -138,7 +138,7 @@ protected:
|
||||
void type0_timeout_r(const uint32_t offset);
|
||||
void type0_timeout_w(const uint32_t offset);
|
||||
bool translate(uint32_t &addr);
|
||||
void l2p_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void l2p_command(const std::vector<std::string> ¶ms);
|
||||
uint32_t vaddr_to_cache_line(uint32_t vaddr);
|
||||
|
||||
enum
|
||||
|
@ -62,7 +62,7 @@ dave_device::dave_device(const machine_config &mconfig, const char *tag, device_
|
||||
device_memory_interface(mconfig, *this),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_program_space_config("program", ENDIANNESS_LITTLE, 8, 22, 0, address_map_constructor(FUNC(dave_device::program_map), this)),
|
||||
m_io_space_config("i/o", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(dave_device::io_map), this)),
|
||||
m_io_space_config("io", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(dave_device::io_map), this)),
|
||||
m_write_irq(*this),
|
||||
m_write_lh(*this),
|
||||
m_write_rh(*this),
|
||||
|
@ -150,8 +150,8 @@ template<typename ChipClass>
|
||||
ym2610_device_base<ChipClass>::ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) :
|
||||
ymfm_ssg_device_base<ChipClass>(mconfig, tag, owner, clock, type),
|
||||
device_memory_interface(mconfig, *this),
|
||||
m_adpcm_a_config("adpcm-a", ENDIANNESS_LITTLE, 8, 24, 0),
|
||||
m_adpcm_b_config("adpcm-b", ENDIANNESS_LITTLE, 8, 24, 0),
|
||||
m_adpcm_a_config("adpcm_a", ENDIANNESS_LITTLE, 8, 24, 0),
|
||||
m_adpcm_b_config("adpcm_b", ENDIANNESS_LITTLE, 8, 24, 0),
|
||||
m_adpcm_a_region(*this, "adpcma"),
|
||||
m_adpcm_b_region(*this, "adpcmb")
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,26 +16,34 @@
|
||||
#include "debugcpu.h"
|
||||
#include "debugcon.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
||||
class debugger_commands
|
||||
{
|
||||
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 ¶m, bool &result);
|
||||
|
||||
/* validates a parameter as a numeric value */
|
||||
bool validate_number_parameter(const std::string ¶m, u64 &result);
|
||||
// validates a parameter as a numeric value
|
||||
bool validate_number_parameter(std::string_view param, u64 &result);
|
||||
|
||||
/* validates a parameter as a cpu */
|
||||
bool validate_cpu_parameter(const char *param, device_t *&result);
|
||||
// validates a parameter as a device
|
||||
bool validate_device_parameter(std::string_view param, device_t *&result);
|
||||
|
||||
/* validates a parameter as a cpu and retrieves the given address space */
|
||||
bool validate_cpu_space_parameter(const char *param, int spacenum, address_space *&result);
|
||||
// validates a parameter as a CPU
|
||||
bool validate_cpu_parameter(std::string_view param, device_t *&result);
|
||||
|
||||
/* validates a parameter as a memory region name and retrieves the given region */
|
||||
bool validate_memory_region_parameter(const std::string ¶m, memory_region *&result);
|
||||
// validates a parameter as an address space identifier
|
||||
bool validate_device_space_parameter(std::string_view param, int spacenum, address_space *&result);
|
||||
|
||||
// validates a parameter as a target address and retrieves the given address space and address
|
||||
bool validate_target_address_parameter(std::string_view param, int spacenum, address_space *&space, u64 &addr);
|
||||
|
||||
// validates a parameter as a memory region name and retrieves the given region
|
||||
bool validate_memory_region_parameter(std::string_view param, memory_region *&result);
|
||||
|
||||
private:
|
||||
struct global_entry
|
||||
@ -67,7 +75,6 @@ private:
|
||||
u8 swapped_cheat;
|
||||
};
|
||||
|
||||
|
||||
struct cheat_region_map
|
||||
{
|
||||
u64 offset;
|
||||
@ -76,7 +83,9 @@ private:
|
||||
u8 disabled;
|
||||
};
|
||||
|
||||
bool debug_command_parameter_expression(const std::string ¶m, parsed_expression &result);
|
||||
device_t &get_device_search_base(std::string_view ¶m);
|
||||
device_t *get_cpu_by_index(u64 cpunum);
|
||||
bool debug_command_parameter_expression(std::string_view param, parsed_expression &result);
|
||||
bool debug_command_parameter_command(const char *param);
|
||||
|
||||
bool cheat_address_is_valid(address_space &space, offs_t address);
|
||||
@ -84,14 +93,6 @@ private:
|
||||
u64 cheat_byte_swap(const cheat_system *cheatsys, u64 value);
|
||||
u64 cheat_read_extended(const cheat_system *cheatsys, address_space &space, offs_t address);
|
||||
|
||||
u64 execute_min(int params, const u64 *param);
|
||||
u64 execute_max(int params, const u64 *param);
|
||||
u64 execute_if(int params, const u64 *param);
|
||||
u64 execute_abs(int params, const u64 *param);
|
||||
u64 execute_bit(int params, const u64 *param);
|
||||
u64 execute_s8(int params, const u64 *param);
|
||||
u64 execute_s16(int params, const u64 *param);
|
||||
u64 execute_s32(int params, const u64 *param);
|
||||
u64 get_cpunum();
|
||||
|
||||
u64 global_get(global_entry *global);
|
||||
@ -99,85 +100,85 @@ private:
|
||||
|
||||
int mini_printf(char *buffer, const char *format, int params, u64 *param);
|
||||
|
||||
void execute_trace_internal(int ref, const std::vector<std::string> ¶ms, bool trace_over);
|
||||
void execute_trace_internal(const std::vector<std::string> ¶ms, bool trace_over);
|
||||
|
||||
void execute_help(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_print(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_printf(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_logerror(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_tracelog(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_tracesym(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_cls(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_quit(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_do(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_step(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_over(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_out(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_go(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_go_vblank(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_go_interrupt(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_go_exception(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_go_time(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_go_privilege(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_focus(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_ignore(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_observe(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_suspend(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_resume(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_next(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_cpulist(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_comment_add(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_comment_del(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_comment_save(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_comment_list(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_comment_commit(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_bpset(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_bpclear(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_bpdisenable(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_bplist(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_wpset(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_wpclear(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_wpdisenable(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_wplist(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_rpset(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_rpclear(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_rpdisenable(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_rplist(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_statesave(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_stateload(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_rewind(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_save(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_saveregion(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_load(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_loadregion(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_dump(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_strdump(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatinit(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatnext(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatlist(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatundo(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_dasm(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_find(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_fill(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_trace(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_traceover(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_traceflush(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_history(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_trackpc(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_trackmem(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_pcatmem(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_snap(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_source(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_map(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_memdump(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_symlist(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_softreset(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_hardreset(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_images(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_mount(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_unmount(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_input(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_dumpkbd(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_help(const std::vector<std::string> ¶ms);
|
||||
void execute_print(const std::vector<std::string> ¶ms);
|
||||
void execute_printf(const std::vector<std::string> ¶ms);
|
||||
void execute_logerror(const std::vector<std::string> ¶ms);
|
||||
void execute_tracelog(const std::vector<std::string> ¶ms);
|
||||
void execute_tracesym(const std::vector<std::string> ¶ms);
|
||||
void execute_cls(const std::vector<std::string> ¶ms);
|
||||
void execute_quit(const std::vector<std::string> ¶ms);
|
||||
void execute_do(const std::vector<std::string> ¶ms);
|
||||
void execute_step(const std::vector<std::string> ¶ms);
|
||||
void execute_over(const std::vector<std::string> ¶ms);
|
||||
void execute_out(const std::vector<std::string> ¶ms);
|
||||
void execute_go(const std::vector<std::string> ¶ms);
|
||||
void execute_go_vblank(const std::vector<std::string> ¶ms);
|
||||
void execute_go_interrupt(const std::vector<std::string> ¶ms);
|
||||
void execute_go_exception(const std::vector<std::string> ¶ms);
|
||||
void execute_go_time(const std::vector<std::string> ¶ms);
|
||||
void execute_go_privilege(const std::vector<std::string> ¶ms);
|
||||
void execute_focus(const std::vector<std::string> ¶ms);
|
||||
void execute_ignore(const std::vector<std::string> ¶ms);
|
||||
void execute_observe(const std::vector<std::string> ¶ms);
|
||||
void execute_suspend(const std::vector<std::string> ¶ms);
|
||||
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_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);
|
||||
void execute_comment_list(const std::vector<std::string> ¶ms);
|
||||
void execute_comment_commit(const std::vector<std::string> ¶ms);
|
||||
void execute_bpset(const std::vector<std::string> ¶ms);
|
||||
void execute_bpclear(const std::vector<std::string> ¶ms);
|
||||
void execute_bpdisenable(bool enable, const std::vector<std::string> ¶ms);
|
||||
void execute_bplist(const std::vector<std::string> ¶ms);
|
||||
void execute_wpset(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_wpclear(const std::vector<std::string> ¶ms);
|
||||
void execute_wpdisenable(bool enable, const std::vector<std::string> ¶ms);
|
||||
void execute_wplist(const std::vector<std::string> ¶ms);
|
||||
void execute_rpset(const std::vector<std::string> ¶ms);
|
||||
void execute_rpclear(const std::vector<std::string> ¶ms);
|
||||
void execute_rpdisenable(bool enable, const std::vector<std::string> ¶ms);
|
||||
void execute_rplist(const std::vector<std::string> ¶ms);
|
||||
void execute_statesave(const std::vector<std::string> ¶ms);
|
||||
void execute_stateload(const std::vector<std::string> ¶ms);
|
||||
void execute_rewind(const std::vector<std::string> ¶ms);
|
||||
void execute_save(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_saveregion(const std::vector<std::string> ¶ms);
|
||||
void execute_load(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_loadregion(const std::vector<std::string> ¶ms);
|
||||
void execute_dump(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_strdump(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatrange(bool init, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatnext(bool initial, const std::vector<std::string> ¶ms);
|
||||
void execute_cheatlist(const std::vector<std::string> ¶ms);
|
||||
void execute_cheatundo(const std::vector<std::string> ¶ms);
|
||||
void execute_dasm(const std::vector<std::string> ¶ms);
|
||||
void execute_find(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_fill(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_trace(const std::vector<std::string> ¶ms);
|
||||
void execute_traceover(const std::vector<std::string> ¶ms);
|
||||
void execute_traceflush(const std::vector<std::string> ¶ms);
|
||||
void execute_history(const std::vector<std::string> ¶ms);
|
||||
void execute_trackpc(const std::vector<std::string> ¶ms);
|
||||
void execute_trackmem(const std::vector<std::string> ¶ms);
|
||||
void execute_pcatmem(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_snap(const std::vector<std::string> ¶ms);
|
||||
void execute_source(const std::vector<std::string> ¶ms);
|
||||
void execute_map(int spacenum, const std::vector<std::string> ¶ms);
|
||||
void execute_memdump(const std::vector<std::string> ¶ms);
|
||||
void execute_symlist(const std::vector<std::string> ¶ms);
|
||||
void execute_softreset(const std::vector<std::string> ¶ms);
|
||||
void execute_hardreset(const std::vector<std::string> ¶ms);
|
||||
void execute_images(const std::vector<std::string> ¶ms);
|
||||
void execute_mount(const std::vector<std::string> ¶ms);
|
||||
void execute_unmount(const std::vector<std::string> ¶ms);
|
||||
void execute_input(const std::vector<std::string> ¶ms);
|
||||
void execute_dumpkbd(const std::vector<std::string> ¶ms);
|
||||
|
||||
running_machine& m_machine;
|
||||
debugger_console& m_console;
|
||||
|
@ -10,13 +10,19 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "debugcon.h"
|
||||
|
||||
#include "debugcpu.h"
|
||||
#include "debugvw.h"
|
||||
#include "textbuf.h"
|
||||
|
||||
#include "debugger.h"
|
||||
|
||||
#include "corestr.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
@ -65,8 +71,8 @@ debugger_console::debugger_console(running_machine &machine)
|
||||
m_machine.add_logerror_callback(std::bind(&debugger_console::errorlog_write_line, this, _1));
|
||||
|
||||
/* register our own custom-command help */
|
||||
register_command("helpcustom", CMDFLAG_NONE, 0, 0, 0, std::bind(&debugger_console::execute_help_custom, this, _1, _2));
|
||||
register_command("condump", CMDFLAG_NONE, 0, 1, 1, std::bind(&debugger_console::execute_condump, this, _1, _2));
|
||||
register_command("helpcustom", CMDFLAG_NONE, 0, 0, std::bind(&debugger_console::execute_help_custom, this, _1));
|
||||
register_command("condump", CMDFLAG_NONE, 1, 1, std::bind(&debugger_console::execute_condump, this, _1));
|
||||
|
||||
/* first CPU is visible by default */
|
||||
for (device_t &device : device_enumerator(m_machine.root_device()))
|
||||
@ -106,10 +112,25 @@ void debugger_console::exit()
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
debugger_console::debug_command::debug_command(const char *_command, u32 _flags, int _ref, int _minparams, int _maxparams, std::function<void(int, const std::vector<std::string> &)> _handler)
|
||||
: params(nullptr), help(nullptr), handler(std::move(_handler)), flags(_flags), ref(_ref), minparams(_minparams), maxparams(_maxparams)
|
||||
inline bool debugger_console::debug_command::compare::operator()(const debug_command &a, const debug_command &b) const
|
||||
{
|
||||
return core_stricmp(a.command.c_str(), b.command.c_str()) < 0;
|
||||
}
|
||||
|
||||
inline bool debugger_console::debug_command::compare::operator()(const char *a, const debug_command &b) const
|
||||
{
|
||||
return core_stricmp(a, b.command.c_str()) < 0;
|
||||
}
|
||||
|
||||
inline bool debugger_console::debug_command::compare::operator()(const debug_command &a, const char *b) const
|
||||
{
|
||||
return core_stricmp(a.command.c_str(), b) < 0;
|
||||
}
|
||||
|
||||
|
||||
debugger_console::debug_command::debug_command(const char *_command, u32 _flags, int _minparams, int _maxparams, std::function<void (const std::vector<std::string> &)> &&_handler)
|
||||
: command(_command), params(nullptr), help(nullptr), handler(std::move(_handler)), flags(_flags), minparams(_minparams), maxparams(_maxparams)
|
||||
{
|
||||
strcpy(command, _command);
|
||||
}
|
||||
|
||||
|
||||
@ -117,14 +138,14 @@ debugger_console::debug_command::debug_command(const char *_command, u32 _flags,
|
||||
execute_help_custom - execute the helpcustom command
|
||||
------------------------------------------------------------*/
|
||||
|
||||
void debugger_console::execute_help_custom(int ref, const std::vector<std::string> ¶ms)
|
||||
void debugger_console::execute_help_custom(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
char buf[64];
|
||||
for (const debug_command &cmd : m_commandlist)
|
||||
{
|
||||
if (cmd.flags & CMDFLAG_CUSTOM_HELP)
|
||||
{
|
||||
snprintf(buf, 63, "%s help", cmd.command);
|
||||
snprintf(buf, 63, "%s help", cmd.command.c_str());
|
||||
buf[63] = 0;
|
||||
char *temp_params[1] = { buf };
|
||||
internal_execute_command(true, 1, &temp_params[0]);
|
||||
@ -136,7 +157,7 @@ void debugger_console::execute_help_custom(int ref, const std::vector<std::strin
|
||||
execute_condump - execute the condump command
|
||||
------------------------------------------------------------*/
|
||||
|
||||
void debugger_console::execute_condump(int ref, const std::vector<std::string>& params)
|
||||
void debugger_console::execute_condump(const std::vector<std::string>& params)
|
||||
{
|
||||
std::string filename = params[0];
|
||||
const char* mode;
|
||||
@ -245,15 +266,12 @@ void debugger_console::trim_parameter(char **paramptr, bool keep_quotes)
|
||||
|
||||
CMDERR debugger_console::internal_execute_command(bool execute, int params, char **param)
|
||||
{
|
||||
int i, foundcount = 0;
|
||||
char *p, *command;
|
||||
size_t len;
|
||||
|
||||
/* no params is an error */
|
||||
// no params is an error
|
||||
if (params == 0)
|
||||
return CMDERR::none();
|
||||
|
||||
/* the first parameter has the command and the real first parameter; separate them */
|
||||
// the first parameter has the command and the real first parameter; separate them
|
||||
char *p, *command;
|
||||
for (p = param[0]; *p && isspace(u8(*p)); p++) { }
|
||||
for (command = p; *p && !isspace(u8(*p)); p++) { }
|
||||
if (*p != 0)
|
||||
@ -271,46 +289,39 @@ CMDERR debugger_console::internal_execute_command(bool execute, int params, char
|
||||
param[0] = nullptr;
|
||||
}
|
||||
|
||||
/* search the command list */
|
||||
len = strlen(command);
|
||||
debug_command *found = nullptr;
|
||||
for (debug_command &cmd : m_commandlist)
|
||||
if (!core_strnicmp(command, cmd.command, len))
|
||||
{
|
||||
foundcount++;
|
||||
found = &cmd;
|
||||
if (strlen(cmd.command) == len)
|
||||
{
|
||||
foundcount = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// search the command list
|
||||
size_t const len = strlen(command);
|
||||
auto const found = m_commandlist.lower_bound(command);
|
||||
|
||||
/* error if not found */
|
||||
if (!found)
|
||||
// error if not found
|
||||
if ((m_commandlist.end() == found) || core_strnicmp(command, found->command.c_str(), len))
|
||||
return CMDERR::unknown_command(0);
|
||||
if (foundcount > 1)
|
||||
return CMDERR::ambiguous_command(0);
|
||||
if (found->command.length() > len)
|
||||
{
|
||||
auto const next = std::next(found);
|
||||
if ((m_commandlist.end() != next) && !core_strnicmp(command, next->command.c_str(), len))
|
||||
return CMDERR::ambiguous_command(0);
|
||||
}
|
||||
|
||||
/* NULL-terminate and trim space around all the parameters */
|
||||
for (i = 1; i < params; i++)
|
||||
// NUL-terminate and trim space around all the parameters
|
||||
for (int i = 1; i < params; i++)
|
||||
*param[i]++ = 0;
|
||||
|
||||
/* now go back and trim quotes and braces and any spaces they reveal*/
|
||||
for (i = 0; i < params; i++)
|
||||
// now go back and trim quotes and braces and any spaces they reveal
|
||||
for (int i = 0; i < params; i++)
|
||||
trim_parameter(¶m[i], found->flags & CMDFLAG_KEEP_QUOTES);
|
||||
|
||||
/* see if we have the right number of parameters */
|
||||
// see if we have the right number of parameters
|
||||
if (params < found->minparams)
|
||||
return CMDERR::not_enough_params(0);
|
||||
if (params > found->maxparams)
|
||||
return CMDERR::too_many_params(0);
|
||||
|
||||
/* execute the handler */
|
||||
// execute the handler
|
||||
if (execute)
|
||||
{
|
||||
std::vector<std::string> params_vec(param, param + params);
|
||||
found->handler(found->ref, params_vec);
|
||||
found->handler(params_vec);
|
||||
}
|
||||
return CMDERR::none();
|
||||
}
|
||||
@ -457,15 +468,16 @@ CMDERR debugger_console::validate_command(const char *command)
|
||||
register_command - register a command handler
|
||||
-------------------------------------------------*/
|
||||
|
||||
void debugger_console::register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function<void(int, const std::vector<std::string> &)> handler)
|
||||
void debugger_console::register_command(const char *command, u32 flags, int minparams, int maxparams, std::function<void (const std::vector<std::string> &)> &&handler)
|
||||
{
|
||||
if (m_machine.phase() != machine_phase::INIT)
|
||||
throw emu_fatalerror("Can only call debugger_console::register_command() at init time!");
|
||||
if (!(m_machine.debug_flags & DEBUG_FLAG_ENABLED))
|
||||
throw emu_fatalerror("Cannot call debugger_console::register_command() when debugger is not running");
|
||||
|
||||
assert(strlen(command) < 32);
|
||||
m_commandlist.emplace_front(command, flags, ref, minparams, maxparams, handler);
|
||||
auto const ins = m_commandlist.emplace(command, flags, minparams, maxparams, std::move(handler));
|
||||
if (!ins.second)
|
||||
osd_printf_error("error: Duplicate debugger command %s registered\n", command);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "textbuf.h"
|
||||
|
||||
#include <functional>
|
||||
#include <set>
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -82,7 +83,7 @@ public:
|
||||
// command handling
|
||||
CMDERR execute_command(const std::string &command, bool echo);
|
||||
CMDERR validate_command(const char *command);
|
||||
void register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function<void(int, const std::vector<std::string> &)> handler);
|
||||
void register_command(const char *command, u32 flags, int minparams, int maxparams, std::function<void (const std::vector<std::string> &)> &&handler);
|
||||
void source_script(const char *file);
|
||||
void process_source_file();
|
||||
|
||||
@ -118,8 +119,8 @@ public:
|
||||
private:
|
||||
void exit();
|
||||
|
||||
void execute_help_custom(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_condump(int ref, const std::vector<std::string>& params);
|
||||
void execute_help_custom(const std::vector<std::string> ¶ms);
|
||||
void execute_condump(const std::vector<std::string>& params);
|
||||
|
||||
void trim_parameter(char **paramptr, bool keep_quotes);
|
||||
CMDERR internal_execute_command(bool execute, int params, char **param);
|
||||
@ -130,14 +131,21 @@ private:
|
||||
|
||||
struct debug_command
|
||||
{
|
||||
debug_command(const char *_command, u32 _flags, int _ref, int _minparams, int _maxparams, std::function<void(int, const std::vector<std::string> &)> _handler);
|
||||
debug_command(const char *_command, u32 _flags, int _minparams, int _maxparams, std::function<void (const std::vector<std::string> &)> &&_handler);
|
||||
|
||||
char command[32];
|
||||
struct compare
|
||||
{
|
||||
using is_transparent = void;
|
||||
bool operator()(const debug_command &a, const debug_command &b) const;
|
||||
bool operator()(const char *a, const debug_command &b) const;
|
||||
bool operator()(const debug_command &a, const char *b) const;
|
||||
};
|
||||
|
||||
std::string command;
|
||||
const char * params;
|
||||
const char * help;
|
||||
std::function<void(int, const std::vector<std::string> &)> handler;
|
||||
std::function<void (const std::vector<std::string> &)> handler;
|
||||
u32 flags;
|
||||
int ref;
|
||||
int minparams;
|
||||
int maxparams;
|
||||
};
|
||||
@ -150,7 +158,7 @@ private:
|
||||
text_buffer_ptr m_console_textbuf;
|
||||
text_buffer_ptr m_errorlog_textbuf;
|
||||
|
||||
std::forward_list<debug_command> m_commandlist;
|
||||
std::set<debug_command, debug_command::compare> m_commandlist;
|
||||
|
||||
std::unique_ptr<std::istream> m_source_file; // script source file
|
||||
std::unique_ptr<emu_file> m_logfile; // logfile for debug console output
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,12 +13,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
/* help management */
|
||||
const char * debug_get_help(const char *tag);
|
||||
// help management
|
||||
const char *debug_get_help(std::string_view tag);
|
||||
|
||||
#endif // MAME_EMU_DEBUG_DEBUGHLP_H
|
||||
|
@ -1057,15 +1057,19 @@ expression_error::error_code symbol_table::memory_valid(const char *name, expres
|
||||
// parsed_expression - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
parsed_expression::parsed_expression(symbol_table &symtable, const char *expression, int default_base)
|
||||
parsed_expression::parsed_expression(symbol_table &symtable)
|
||||
: m_symtable(symtable)
|
||||
, m_default_base(16)
|
||||
{
|
||||
}
|
||||
|
||||
parsed_expression::parsed_expression(symbol_table &symtable, std::string_view expression, int default_base)
|
||||
: m_symtable(symtable)
|
||||
, m_default_base(default_base)
|
||||
{
|
||||
assert(default_base == 8 || default_base == 10 || default_base == 16);
|
||||
|
||||
// if we got an expression parse it
|
||||
if (expression != nullptr)
|
||||
parse(expression);
|
||||
parse(expression);
|
||||
}
|
||||
|
||||
|
||||
@ -1087,7 +1091,7 @@ parsed_expression::parsed_expression(const parsed_expression &src)
|
||||
// parse - parse an expression into tokens
|
||||
//-------------------------------------------------
|
||||
|
||||
void parsed_expression::parse(const char *expression)
|
||||
void parsed_expression::parse(std::string_view expression)
|
||||
{
|
||||
// copy the string and reset our parsing state
|
||||
m_original_string.assign(expression);
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
@ -223,7 +224,8 @@ class parsed_expression
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
parsed_expression(symbol_table &symtable, const char *expression = nullptr, int default_base = 16);
|
||||
parsed_expression(symbol_table &symtable);
|
||||
parsed_expression(symbol_table &symtable, std::string_view expression, int default_base = 16);
|
||||
parsed_expression(const parsed_expression &src);
|
||||
parsed_expression(parsed_expression &&src) = default;
|
||||
|
||||
@ -241,7 +243,7 @@ public:
|
||||
void set_default_base(int base) { assert(base == 8 || base == 10 || base == 16); m_default_base = base; }
|
||||
|
||||
// execution
|
||||
void parse(const char *string);
|
||||
void parse(std::string_view string);
|
||||
u64 execute() { return execute_tokens(); }
|
||||
|
||||
private:
|
||||
|
@ -923,7 +923,7 @@ device_t *device_t::subdevice_slow(std::string_view tag) const
|
||||
std::string device_t::subtag(std::string_view tag) const
|
||||
{
|
||||
std::string result;
|
||||
if (!tag.empty() && tag[0] == ':')
|
||||
if (!tag.empty() && (tag[0] == ':'))
|
||||
{
|
||||
// if the tag begins with a colon, ignore our path and start from the root
|
||||
tag.remove_prefix(1);
|
||||
@ -934,28 +934,41 @@ std::string device_t::subtag(std::string_view tag) const
|
||||
// otherwise, start with our path
|
||||
result.assign(m_tag);
|
||||
if (result != ":")
|
||||
result.append(":");
|
||||
result.append(1, ':');
|
||||
}
|
||||
|
||||
// iterate over the tag, look for special path characters to resolve
|
||||
std::string_view::size_type caret;
|
||||
while ((caret = tag.find('^')) != std::string_view::npos)
|
||||
std::string_view::size_type delimiter;
|
||||
while ((delimiter = tag.find_first_of("^:")) != std::string_view::npos)
|
||||
{
|
||||
// copy everything up to there
|
||||
result.append(tag, 0, caret);
|
||||
tag.remove_prefix(caret + 1);
|
||||
bool const parent = tag[delimiter] == '^';
|
||||
result.append(tag, 0, delimiter);
|
||||
tag.remove_prefix(delimiter + 1);
|
||||
|
||||
// strip trailing colons
|
||||
int len = result.length();
|
||||
while (result[--len] == ':')
|
||||
result = result.substr(0, len);
|
||||
|
||||
// remove the last path part, leaving the last colon
|
||||
if (result != ":")
|
||||
if (parent)
|
||||
{
|
||||
int lastcolon = result.find_last_of(':');
|
||||
if (lastcolon != -1)
|
||||
result = result.substr(0, lastcolon + 1);
|
||||
// strip trailing colons
|
||||
std::string::size_type len = result.length();
|
||||
while ((len > 1) && (result[--len] == ':'))
|
||||
result.resize(len);
|
||||
|
||||
// remove the last path part, leaving the last colon
|
||||
if (result != ":")
|
||||
{
|
||||
std::string::size_type lastcolon = result.find_last_of(':');
|
||||
if (lastcolon != std::string::npos)
|
||||
result.resize(lastcolon + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// collapse successive colons
|
||||
if (result.back() != ':')
|
||||
result.append(1, ':');
|
||||
delimiter = tag.find_first_not_of(':');
|
||||
if (delimiter != std::string_view::npos)
|
||||
tag.remove_prefix(delimiter);
|
||||
}
|
||||
}
|
||||
|
||||
@ -963,9 +976,9 @@ std::string device_t::subtag(std::string_view tag) const
|
||||
result.append(tag);
|
||||
|
||||
// strip trailing colons up to the root
|
||||
int len = result.length();
|
||||
while (len > 1 && result[--len] == ':')
|
||||
result = result.substr(0, len);
|
||||
std::string::size_type len = result.length();
|
||||
while ((len > 1) && (result[--len] == ':'))
|
||||
result.resize(len);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS
|
||||
@ -95,21 +97,48 @@ void device_memory_interface::interface_config_complete()
|
||||
void device_memory_interface::interface_validity_check(validity_checker &valid) const
|
||||
{
|
||||
// loop over all address spaces
|
||||
std::map<std::string, int> space_name_map;
|
||||
const int max_spaces = std::max(m_address_map.size(), m_address_config.size());
|
||||
for (int spacenum = 0; spacenum < max_spaces; ++spacenum)
|
||||
{
|
||||
const address_space_config *config = space_config(spacenum);
|
||||
if (config != nullptr)
|
||||
if (config)
|
||||
{
|
||||
// validate name
|
||||
if (!config->name() || !*config->name())
|
||||
{
|
||||
osd_printf_error("Name is empty for address space %d\n", config->name(), spacenum);
|
||||
}
|
||||
else
|
||||
{
|
||||
static char const *const validchars = "abcdefghijklmnopqrstuvwxyz0123456789_";
|
||||
for (char const *p = config->name(); *p; ++p)
|
||||
{
|
||||
if (*p == ' ')
|
||||
{
|
||||
osd_printf_error("Name for address space %s (%d) contains spaces\n", config->name(), spacenum);
|
||||
break;
|
||||
}
|
||||
if (!strchr(validchars, *p))
|
||||
{
|
||||
osd_printf_error("Name for address space %s (%d) contains invalid character '%c'\n", config->name(), spacenum, *p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
auto const ins = space_name_map.emplace(config->name(), spacenum);
|
||||
if (!ins.second)
|
||||
osd_printf_error("Name for address space %s (%d) already used for space %d\n", config->name(), spacenum, ins.first->second);
|
||||
}
|
||||
|
||||
// validate data width
|
||||
int width = config->data_width();
|
||||
if (width != 8 && width != 16 && width != 32 && width != 64)
|
||||
osd_printf_error("Invalid data width %d specified for address space %d\n", width, spacenum);
|
||||
osd_printf_error("Invalid data width %d specified for address space %s (%d)\n", width, config->name(), spacenum);
|
||||
|
||||
// validate address shift
|
||||
int shift = config->addr_shift();
|
||||
if (shift < 0 && (width >> -shift) < 8)
|
||||
osd_printf_error("Invalid shift %d specified for address space %d\n", shift, spacenum);
|
||||
osd_printf_error("Invalid shift %d specified for address space %s (%d)\n", shift, config->name(), spacenum);
|
||||
|
||||
// construct the map
|
||||
::address_map addrmap(const_cast<device_t &>(device()), spacenum);
|
||||
|
@ -661,9 +661,9 @@ private:
|
||||
void chihiro_map_io(address_map &map);
|
||||
|
||||
void jamtable_disasm(address_space &space, uint32_t address, uint32_t size);
|
||||
void jamtable_disasm_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void chihiro_help_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_commands(int ref, const std::vector<std::string> ¶ms);
|
||||
void jamtable_disasm_command(const std::vector<std::string> ¶ms);
|
||||
void chihiro_help_command(const std::vector<std::string> ¶ms);
|
||||
void debug_commands(const std::vector<std::string> ¶ms);
|
||||
};
|
||||
|
||||
/* jamtable instructions for Chihiro (different from Xbox console)
|
||||
@ -778,7 +778,7 @@ void chihiro_state::jamtable_disasm(address_space &space, uint32_t address, uint
|
||||
}
|
||||
}
|
||||
|
||||
void chihiro_state::jamtable_disasm_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void chihiro_state::jamtable_disasm_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
address_space &space = m_maincpu->space();
|
||||
uint64_t addr, size;
|
||||
@ -792,7 +792,7 @@ void chihiro_state::jamtable_disasm_command(int ref, const std::vector<std::stri
|
||||
jamtable_disasm(space, (uint32_t)addr, (uint32_t)size);
|
||||
}
|
||||
|
||||
void chihiro_state::chihiro_help_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void chihiro_state::chihiro_help_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
@ -801,14 +801,14 @@ void chihiro_state::chihiro_help_command(int ref, const std::vector<std::string>
|
||||
con.printf(" chihiro help -- this list\n");
|
||||
}
|
||||
|
||||
void chihiro_state::debug_commands(int ref, const std::vector<std::string> ¶ms)
|
||||
void chihiro_state::debug_commands(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() < 1)
|
||||
return;
|
||||
if (params[0] == "jamdis")
|
||||
jamtable_disasm_command(ref, params);
|
||||
jamtable_disasm_command(params);
|
||||
else
|
||||
chihiro_help_command(ref, params);
|
||||
chihiro_help_command(params);
|
||||
}
|
||||
|
||||
void chihiro_state::hack_eeprom()
|
||||
@ -1839,7 +1839,7 @@ void chihiro_state::machine_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("chihiro", CMDFLAG_NONE, 0, 1, 4, std::bind(&chihiro_state::debug_commands, this, _1, _2));
|
||||
machine().debugger().console().register_command("chihiro", CMDFLAG_NONE, 1, 4, std::bind(&chihiro_state::debug_commands, this, _1));
|
||||
}
|
||||
m_hack_index = -1;
|
||||
for (int a = 1; a < HACK_ITEMS; a++)
|
||||
|
@ -216,15 +216,16 @@ Notes:
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/powerpc/ppc.h"
|
||||
#include "machine/3dom2.h"
|
||||
|
||||
#include "bus/ata/ataintf.h"
|
||||
#include "bus/ata/cr589.h"
|
||||
#include "machine/3dom2.h"
|
||||
#include "cpu/powerpc/ppc.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "machine/timekpr.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/ymz280b.h"
|
||||
#include "cdrom.h"
|
||||
|
||||
#include "debug/debugcon.h"
|
||||
#include "debug/debugcmd.h"
|
||||
#include "debugger.h"
|
||||
@ -232,6 +233,11 @@ Notes:
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include "cdrom.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
#define M2_CLOCK XTAL(66'666'700)
|
||||
|
||||
#define ENABLE_SDBG 0
|
||||
@ -239,7 +245,7 @@ Notes:
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* ROM definition(s)
|
||||
* driver state class
|
||||
*
|
||||
*************************************/
|
||||
|
||||
@ -365,10 +371,10 @@ private:
|
||||
m_ata_int = param;
|
||||
}
|
||||
|
||||
void debug_help_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_commands(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_help_command(const std::vector<std::string> ¶ms);
|
||||
void debug_commands(const std::vector<std::string> ¶ms);
|
||||
|
||||
void dump_task_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void dump_task_command(const std::vector<std::string> ¶ms);
|
||||
};
|
||||
|
||||
|
||||
@ -693,13 +699,13 @@ void konamim2_state::machine_start()
|
||||
m_available_cdroms = cdrom_open(machine().rom_load().get_disk_handle(":cdrom"));
|
||||
|
||||
// TODO: REMOVE
|
||||
m_atapi_timer = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( konamim2_state::atapi_delay ),this ) );
|
||||
m_atapi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(konamim2_state::atapi_delay), this));
|
||||
m_atapi_timer->adjust( attotime::never );
|
||||
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("m2", CMDFLAG_NONE, 0, 1, 4, std::bind(&konamim2_state::debug_commands, this, _1, _2));
|
||||
machine().debugger().console().register_command("m2", CMDFLAG_NONE, 1, 4, std::bind(&konamim2_state::debug_commands, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1472,36 +1478,13 @@ void konamim2_state::init_hellngt()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Game driver(s)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1997, polystar, 0, polystar, polystar, konamim2_state, empty_init, ROT0, "Konami", "Tobe! Polystars (ver JAA)", MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_SOUND )
|
||||
GAME( 1997, totlvice, 0, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver EBA)", MACHINE_IMPERFECT_TIMING )
|
||||
//GAME( 1997, totlvicd, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver EAD)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1997, totlvicj, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver JAD)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1997, totlvica, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver AAB)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1997, totlvicu, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver UAC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1998, btltryst, 0, btltryst, btltryst, konamim2_state, init_btltryst, ROT0, "Konami", "Battle Tryst (ver JAC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_GRAPHICS )
|
||||
//GAME( 1998, btltrysta, btltryst, btltryst, btltryst, konamim2_state, init_btltryst, ROT0, "Konami", "Battle Tryst (ver JAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1998, heatof11, 0, heatof11, heatof11, konamim2_state, init_btltryst, ROT0, "Konami", "Heat of Eleven '98 (ver EAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_GRAPHICS)
|
||||
GAME( 1998, evilngt, 0, evilngt, hellngt, konamim2_state, init_hellngt, ROT0, "Konami", "Evil Night (ver UBA)", MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1998, evilngte, evilngt, evilngt, hellngt, konamim2_state, init_hellngt, ROT0, "Konami", "Evil Night (ver EAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1998, hellngt, evilngt, hellngt, hellngt, konamim2_state, init_hellngt, ROT0, "Konami", "Hell Night (ver EAA)", MACHINE_IMPERFECT_TIMING )
|
||||
|
||||
//CONS( 199?, 3do_m2, 0, 0, 3do_m2, m2, driver_device, 0, "3DO", "3DO M2", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_NO_SOUND )
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Debugging Aids
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void konamim2_state::debug_help_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void konamim2_state::debug_help_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
@ -1510,20 +1493,20 @@ void konamim2_state::debug_help_command(int ref, const std::vector<std::string>
|
||||
con.printf(" konm2 dump_dspp,<address> -- Dump DSPP object at <address>\n");
|
||||
}
|
||||
|
||||
void konamim2_state::debug_commands(int ref, const std::vector<std::string> ¶ms)
|
||||
void konamim2_state::debug_commands(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() < 1)
|
||||
return;
|
||||
|
||||
if (params[0] == "help")
|
||||
debug_help_command(ref, params);
|
||||
debug_help_command(params);
|
||||
else if (params[0] == "dump_task")
|
||||
dump_task_command(ref, params);
|
||||
dump_task_command(params);
|
||||
else if (params[0] == "dump_dspp")
|
||||
subdevice<dspp_device>("bda:dspp")->dump_state();
|
||||
}
|
||||
|
||||
void konamim2_state::dump_task_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void konamim2_state::dump_task_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
typedef uint32_t Item;
|
||||
typedef uint32_t m2ptr;
|
||||
@ -1678,3 +1661,28 @@ void konamim2_state::dump_task_command(int ref, const std::vector<std::string> &
|
||||
con.printf("UserData: %08X\n", task.pt_UserData);
|
||||
con.printf("\n");
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Game driver(s)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1997, polystar, 0, polystar, polystar, konamim2_state, empty_init, ROT0, "Konami", "Tobe! Polystars (ver JAA)", MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_SOUND )
|
||||
GAME( 1997, totlvice, 0, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver EBA)", MACHINE_IMPERFECT_TIMING )
|
||||
//GAME( 1997, totlvicd, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver EAD)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1997, totlvicj, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver JAD)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1997, totlvica, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver AAB)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1997, totlvicu, totlvice, totlvice, totlvice, konamim2_state, init_totlvice, ROT0, "Konami", "Total Vice (ver UAC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1998, btltryst, 0, btltryst, btltryst, konamim2_state, init_btltryst, ROT0, "Konami", "Battle Tryst (ver JAC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_GRAPHICS )
|
||||
//GAME( 1998, btltrysta, btltryst, btltryst, btltryst, konamim2_state, init_btltryst, ROT0, "Konami", "Battle Tryst (ver JAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1998, heatof11, 0, heatof11, heatof11, konamim2_state, init_btltryst, ROT0, "Konami", "Heat of Eleven '98 (ver EAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_IMPERFECT_GRAPHICS)
|
||||
GAME( 1998, evilngt, 0, evilngt, hellngt, konamim2_state, init_hellngt, ROT0, "Konami", "Evil Night (ver UBA)", MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1998, evilngte, evilngt, evilngt, hellngt, konamim2_state, init_hellngt, ROT0, "Konami", "Evil Night (ver EAA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING )
|
||||
GAME( 1998, hellngt, evilngt, hellngt, hellngt, konamim2_state, init_hellngt, ROT0, "Konami", "Hell Night (ver EAA)", MACHINE_IMPERFECT_TIMING )
|
||||
|
||||
//CONS( 199?, 3do_m2, 0, 0, 3do_m2, m2, driver_device, 0, "3DO", "3DO M2", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_TIMING | MACHINE_NO_SOUND )
|
||||
|
@ -226,8 +226,8 @@ private:
|
||||
|
||||
void dgnbeta_map(address_map &map);
|
||||
|
||||
void execute_beta_key_dump(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_beta_dat_log(int ref, const std::vector<std::string> ¶ms);
|
||||
void execute_beta_key_dump(const std::vector<std::string> ¶ms);
|
||||
void execute_beta_dat_log(const std::vector<std::string> ¶ms);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_DGN_BETA_H
|
||||
|
@ -149,7 +149,7 @@ private:
|
||||
bool m_ls123_strobe;
|
||||
double m_ls123_clear_time[4];
|
||||
|
||||
void video_debug(int ref, const std::vector<std::string> ¶ms);
|
||||
void video_debug(const std::vector<std::string> ¶ms);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/mbc55x.c -----------*/
|
||||
|
@ -246,10 +246,10 @@ protected:
|
||||
void scsp_map(address_map &map);
|
||||
|
||||
void debug_init();
|
||||
void debug_commands( int ref, const std::vector<std::string> ¶ms );
|
||||
void debug_geo_dasm_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_tri_dump_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_help_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_commands(const std::vector<std::string> ¶ms);
|
||||
void debug_geo_dasm_command(const std::vector<std::string> ¶ms);
|
||||
void debug_tri_dump_command(const std::vector<std::string> ¶ms);
|
||||
void debug_help_command(const std::vector<std::string> ¶ms);
|
||||
|
||||
virtual void video_start() override;
|
||||
|
||||
|
@ -252,8 +252,8 @@ private:
|
||||
void decode_dssi_f_plonk_char(uint16_t ds, uint16_t si, uint8_t raw_flag);
|
||||
void decode_dssi_f_rw_sectors(uint16_t ds, uint16_t si, uint8_t raw_flag);
|
||||
|
||||
void debug_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void video_debug(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_command(const std::vector<std::string> ¶ms);
|
||||
void video_debug(const std::vector<std::string> ¶ms);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_RMNIMBUS_H
|
||||
|
@ -150,23 +150,23 @@ protected:
|
||||
const debugger_constants *debugc_bios;
|
||||
|
||||
private:
|
||||
void dump_string_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void dump_process_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void dump_list_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void dump_dpc_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void dump_timer_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void curthread_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void threadlist_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void generate_irq_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void nv2a_combiners_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void nv2a_wclipping_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void waitvblank_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void grab_texture_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void grab_vprog_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void vprogdis_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void vdeclaration_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void help_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void xbox_debug_commands(int ref, const std::vector<std::string> ¶ms);
|
||||
void dump_string_command(const std::vector<std::string> ¶ms);
|
||||
void dump_process_command(const std::vector<std::string> ¶ms);
|
||||
void dump_list_command(const std::vector<std::string> ¶ms);
|
||||
void dump_dpc_command(const std::vector<std::string> ¶ms);
|
||||
void dump_timer_command(const std::vector<std::string> ¶ms);
|
||||
void curthread_command(const std::vector<std::string> ¶ms);
|
||||
void threadlist_command(const std::vector<std::string> ¶ms);
|
||||
void generate_irq_command(const std::vector<std::string> ¶ms);
|
||||
void nv2a_combiners_command(const std::vector<std::string> ¶ms);
|
||||
void nv2a_wclipping_command(const std::vector<std::string> ¶ms);
|
||||
void waitvblank_command(const std::vector<std::string> ¶ms);
|
||||
void grab_texture_command(const std::vector<std::string> ¶ms);
|
||||
void grab_vprog_command(const std::vector<std::string> ¶ms);
|
||||
void vprogdis_command(const std::vector<std::string> ¶ms);
|
||||
void vdeclaration_command(const std::vector<std::string> ¶ms);
|
||||
void help_command(const std::vector<std::string> ¶ms);
|
||||
void xbox_debug_commands(const std::vector<std::string> ¶ms);
|
||||
int find_bios_index();
|
||||
bool find_bios_hash(int bios, uint32_t &crc32);
|
||||
void find_debug_params();
|
||||
|
@ -93,13 +93,13 @@ sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, d
|
||||
: device_t(mconfig, SAM6883, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, sam6883_friend_device_interface(mconfig, *this, 4)
|
||||
, m_ram_config("RAM", ENDIANNESS_BIG, 8, 16, 0)
|
||||
, m_rom0_config("ROM0", ENDIANNESS_BIG, 8, 13, 0)
|
||||
, m_rom1_config("ROM1", ENDIANNESS_BIG, 8, 13, 0)
|
||||
, m_rom2_config("ROM2", ENDIANNESS_BIG, 8, 14, 0)
|
||||
, m_io0_config("I/O0", ENDIANNESS_BIG, 8, 5, 0)
|
||||
, m_io1_config("I/O1", ENDIANNESS_BIG, 8, 5, 0)
|
||||
, m_io2_config("I/O2", ENDIANNESS_BIG, 8, 5, 0)
|
||||
, m_ram_config("ram", ENDIANNESS_BIG, 8, 16, 0)
|
||||
, m_rom0_config("rom0", ENDIANNESS_BIG, 8, 13, 0)
|
||||
, m_rom1_config("rom1", ENDIANNESS_BIG, 8, 13, 0)
|
||||
, m_rom2_config("rom2", ENDIANNESS_BIG, 8, 14, 0)
|
||||
, m_io0_config("io0", ENDIANNESS_BIG, 8, 5, 0)
|
||||
, m_io1_config("io1", ENDIANNESS_BIG, 8, 5, 0)
|
||||
, m_io2_config("io2", ENDIANNESS_BIG, 8, 5, 0)
|
||||
, m_boot_config("boot", ENDIANNESS_BIG, 8, 7, 0)
|
||||
{
|
||||
}
|
||||
|
@ -807,8 +807,8 @@ void dgn_beta_state::machine_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("beta_dat_log", CMDFLAG_NONE, 0, 0, 0, std::bind(&dgn_beta_state::execute_beta_dat_log, this, _1, _2));
|
||||
machine().debugger().console().register_command("beta_key_dump", CMDFLAG_NONE, 0, 0, 0, std::bind(&dgn_beta_state::execute_beta_key_dump, this, _1, _2));
|
||||
machine().debugger().console().register_command("beta_dat_log", CMDFLAG_NONE, 0, 0, std::bind(&dgn_beta_state::execute_beta_dat_log, this, _1));
|
||||
machine().debugger().console().register_command("beta_key_dump", CMDFLAG_NONE, 0, 0, std::bind(&dgn_beta_state::execute_beta_key_dump, this, _1));
|
||||
}
|
||||
m_LogDatWrites = false;
|
||||
m_wd2797_written = 0;
|
||||
@ -824,14 +824,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);
|
||||
}
|
||||
|
||||
void dgn_beta_state::execute_beta_dat_log(int ref, const std::vector<std::string> ¶ms)
|
||||
void dgn_beta_state::execute_beta_dat_log(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
m_LogDatWrites = !m_LogDatWrites;
|
||||
|
||||
machine().debugger().console().printf("DAT register write info set : %d\n", m_LogDatWrites);
|
||||
}
|
||||
|
||||
void dgn_beta_state::execute_beta_key_dump(int ref, const std::vector<std::string> ¶ms)
|
||||
void dgn_beta_state::execute_beta_key_dump(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
for (int idx = 0; idx < NoKeyrows; idx++)
|
||||
{
|
||||
|
@ -28,16 +28,16 @@ hpc3_device::hpc3_device(const machine_config &mconfig, const char *tag, device_
|
||||
: device_t(mconfig, SGI_HPC3, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_pio_space_config{
|
||||
{"PIO channel 0", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 1", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 2", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 3", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 4", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 5", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 6", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 7", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 8", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"PIO channel 9", ENDIANNESS_LITTLE, 16, 8, -1}}
|
||||
{"pio0", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio1", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio2", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio3", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio4", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio5", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio6", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio7", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio8", ENDIANNESS_LITTLE, 16, 8, -1},
|
||||
{"pio9", ENDIANNESS_LITTLE, 16, 8, -1}}
|
||||
, m_gio64_space(*this, finder_base::DUMMY_TAG, -1)
|
||||
, m_hal2(*this, finder_base::DUMMY_TAG)
|
||||
, m_enet(*this, finder_base::DUMMY_TAG)
|
||||
|
@ -21,24 +21,24 @@ void model2_state::debug_init()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("m2", CMDFLAG_CUSTOM_HELP, 0, 1, 2, std::bind(&model2_state::debug_commands, this, _1, _2));
|
||||
machine().debugger().console().register_command("m2", CMDFLAG_CUSTOM_HELP, 1, 2, std::bind(&model2_state::debug_commands, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
void model2_state::debug_commands(int ref, const std::vector<std::string> ¶ms)
|
||||
void model2_state::debug_commands(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() < 1)
|
||||
return;
|
||||
|
||||
if (params[0] == "geodasm")
|
||||
debug_geo_dasm_command(ref, params);
|
||||
debug_geo_dasm_command(params);
|
||||
else if(params[0] == "trilist")
|
||||
debug_tri_dump_command(ref, params);
|
||||
debug_tri_dump_command(params);
|
||||
else
|
||||
debug_help_command(ref, params);
|
||||
debug_help_command(params);
|
||||
}
|
||||
|
||||
void model2_state::debug_help_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void model2_state::debug_help_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
@ -54,7 +54,7 @@ void model2_state::debug_help_command(int ref, const std::vector<std::string> &p
|
||||
*
|
||||
****************************************/
|
||||
|
||||
void model2_state::debug_geo_dasm_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void model2_state::debug_geo_dasm_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
@ -264,7 +264,7 @@ void model2_state::debug_geo_dasm_command(int ref, const std::vector<std::string
|
||||
*
|
||||
****************************************/
|
||||
|
||||
void model2_state::debug_tri_dump_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void model2_state::debug_tri_dump_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
FILE *f;
|
||||
|
@ -217,7 +217,7 @@ void rmnimbus_state::machine_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("nimbus_debug", CMDFLAG_NONE, 0, 0, 1, std::bind(&rmnimbus_state::debug_command, this, _1, _2));
|
||||
machine().debugger().console().register_command("nimbus_debug", CMDFLAG_NONE, 0, 1, std::bind(&rmnimbus_state::debug_command, this, _1));
|
||||
|
||||
/* set up the instruction hook */
|
||||
m_maincpu->debug()->set_instruction_hook(instruction_hook);
|
||||
@ -227,7 +227,7 @@ void rmnimbus_state::machine_start()
|
||||
m_fdc->dden_w(0);
|
||||
}
|
||||
|
||||
void rmnimbus_state::debug_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void rmnimbus_state::debug_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() > 0)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ void xbox_base_state::find_debug_params()
|
||||
}
|
||||
}
|
||||
|
||||
void xbox_base_state::dump_string_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::dump_string_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
address_space &space = m_maincpu->space();
|
||||
@ -124,7 +124,7 @@ void xbox_base_state::dump_string_command(int ref, const std::vector<std::string
|
||||
con.printf("\n");
|
||||
}
|
||||
|
||||
void xbox_base_state::dump_process_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::dump_process_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
address_space &space = m_maincpu->space();
|
||||
@ -154,7 +154,7 @@ void xbox_base_state::dump_process_command(int ref, const std::vector<std::strin
|
||||
con.printf("_padding %d byte\n", space.read_byte(address + 27));
|
||||
}
|
||||
|
||||
void xbox_base_state::dump_list_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::dump_list_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
address_space &space = m_maincpu->space();
|
||||
@ -207,7 +207,7 @@ void xbox_base_state::dump_list_command(int ref, const std::vector<std::string>
|
||||
}
|
||||
}
|
||||
|
||||
void xbox_base_state::dump_dpc_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::dump_dpc_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
address_space &space = m_maincpu->space();
|
||||
@ -236,7 +236,7 @@ void xbox_base_state::dump_dpc_command(int ref, const std::vector<std::string> &
|
||||
con.printf("SystemArgument2 %08X dword\n", space.read_dword_unaligned(address + 24));
|
||||
}
|
||||
|
||||
void xbox_base_state::dump_timer_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::dump_timer_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
address_space &space = m_maincpu->space();
|
||||
@ -267,7 +267,7 @@ void xbox_base_state::dump_timer_command(int ref, const std::vector<std::string>
|
||||
con.printf("Period %d dword\n", space.read_dword_unaligned(address + 36));
|
||||
}
|
||||
|
||||
void xbox_base_state::curthread_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::curthread_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
address_space &space = m_maincpu->space();
|
||||
@ -300,7 +300,7 @@ void xbox_base_state::curthread_command(int ref, const std::vector<std::string>
|
||||
con.printf("Current thread function is %08X\n", space.read_dword_unaligned(address));
|
||||
}
|
||||
|
||||
void xbox_base_state::threadlist_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::threadlist_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
address_space &space = m_maincpu->space();
|
||||
debugger_console &con = machine().debugger().console();
|
||||
@ -339,7 +339,7 @@ void xbox_base_state::threadlist_command(int ref, const std::vector<std::string>
|
||||
}
|
||||
}
|
||||
|
||||
void xbox_base_state::generate_irq_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::generate_irq_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
uint64_t irq;
|
||||
|
||||
@ -354,7 +354,7 @@ void xbox_base_state::generate_irq_command(int ref, const std::vector<std::strin
|
||||
debug_generate_irq((int)irq, true);
|
||||
}
|
||||
|
||||
void xbox_base_state::nv2a_combiners_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::nv2a_combiners_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
bool en = nvidia_nv2a->toggle_register_combiners_usage();
|
||||
@ -364,7 +364,7 @@ void xbox_base_state::nv2a_combiners_command(int ref, const std::vector<std::str
|
||||
con.printf("Register combiners disabled\n");
|
||||
}
|
||||
|
||||
void xbox_base_state::nv2a_wclipping_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::nv2a_wclipping_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
bool en = nvidia_nv2a->toggle_clipping_w_support();
|
||||
@ -374,7 +374,7 @@ void xbox_base_state::nv2a_wclipping_command(int ref, const std::vector<std::str
|
||||
con.printf("W clipping disabled\n");
|
||||
}
|
||||
|
||||
void xbox_base_state::waitvblank_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::waitvblank_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
bool en = nvidia_nv2a->toggle_wait_vblank_support();
|
||||
@ -384,7 +384,7 @@ void xbox_base_state::waitvblank_command(int ref, const std::vector<std::string>
|
||||
con.printf("Vblank method disabled\n");
|
||||
}
|
||||
|
||||
void xbox_base_state::grab_texture_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::grab_texture_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
uint64_t type;
|
||||
|
||||
@ -397,7 +397,7 @@ void xbox_base_state::grab_texture_command(int ref, const std::vector<std::strin
|
||||
nvidia_nv2a->debug_grab_texture((int)type, params[2].c_str());
|
||||
}
|
||||
|
||||
void xbox_base_state::grab_vprog_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::grab_vprog_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
uint32_t instruction[4];
|
||||
FILE *fil;
|
||||
@ -416,7 +416,7 @@ void xbox_base_state::grab_vprog_command(int ref, const std::vector<std::string>
|
||||
fclose(fil);
|
||||
}
|
||||
|
||||
void xbox_base_state::vprogdis_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::vprogdis_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
address_space &space = m_maincpu->space();
|
||||
|
||||
@ -468,7 +468,7 @@ void xbox_base_state::vprogdis_command(int ref, const std::vector<std::string> &
|
||||
}
|
||||
}
|
||||
|
||||
void xbox_base_state::vdeclaration_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::vdeclaration_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
address_space &space = m_maincpu->space();
|
||||
|
||||
@ -549,7 +549,7 @@ void xbox_base_state::vdeclaration_command(int ref, const std::vector<std::strin
|
||||
}
|
||||
}
|
||||
|
||||
void xbox_base_state::help_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::help_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
@ -572,42 +572,42 @@ void xbox_base_state::help_command(int ref, const std::vector<std::string> ¶
|
||||
con.printf(" xbox help -- this list\n");
|
||||
}
|
||||
|
||||
void xbox_base_state::xbox_debug_commands(int ref, const std::vector<std::string> ¶ms)
|
||||
void xbox_base_state::xbox_debug_commands(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() < 1)
|
||||
return;
|
||||
if (params[0] == "dump_string")
|
||||
dump_string_command(ref, params);
|
||||
dump_string_command(params);
|
||||
else if (params[0] == "dump_process")
|
||||
dump_process_command(ref, params);
|
||||
dump_process_command(params);
|
||||
else if (params[0] == "dump_list")
|
||||
dump_list_command(ref, params);
|
||||
dump_list_command(params);
|
||||
else if (params[0] == "dump_dpc")
|
||||
dump_dpc_command(ref, params);
|
||||
dump_dpc_command(params);
|
||||
else if (params[0] == "dump_timer")
|
||||
dump_timer_command(ref, params);
|
||||
dump_timer_command(params);
|
||||
else if (params[0] == "curthread")
|
||||
curthread_command(ref, params);
|
||||
curthread_command(params);
|
||||
else if (params[0] == "threadlist")
|
||||
threadlist_command(ref, params);
|
||||
threadlist_command(params);
|
||||
else if (params[0] == "irq")
|
||||
generate_irq_command(ref, params);
|
||||
generate_irq_command(params);
|
||||
else if (params[0] == "nv2a_combiners")
|
||||
nv2a_combiners_command(ref, params);
|
||||
nv2a_combiners_command(params);
|
||||
else if (params[0] == "nv2a_wclipping")
|
||||
nv2a_wclipping_command(ref, params);
|
||||
nv2a_wclipping_command(params);
|
||||
else if (params[0] == "waitvblank")
|
||||
waitvblank_command(ref, params);
|
||||
waitvblank_command(params);
|
||||
else if (params[0] == "grab_texture")
|
||||
grab_texture_command(ref, params);
|
||||
grab_texture_command(params);
|
||||
else if (params[0] == "grab_vprog")
|
||||
grab_vprog_command(ref, params);
|
||||
grab_vprog_command(params);
|
||||
else if (params[0] == "vprogdis")
|
||||
vprogdis_command(ref, params);
|
||||
vprogdis_command(params);
|
||||
else if (params[0] == "vdeclaration")
|
||||
vdeclaration_command(ref, params);
|
||||
vdeclaration_command(params);
|
||||
else
|
||||
help_command(ref, params);
|
||||
help_command(params);
|
||||
}
|
||||
|
||||
void xbox_base_state::debug_generate_irq(int irq, bool active)
|
||||
@ -905,7 +905,7 @@ void xbox_base_state::machine_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("xbox", CMDFLAG_CUSTOM_HELP, 0, 1, 4, std::bind(&xbox_base_state::xbox_debug_commands, this, _1, _2));
|
||||
machine().debugger().console().register_command("xbox", CMDFLAG_CUSTOM_HELP, 1, 4, std::bind(&xbox_base_state::xbox_debug_commands, this, _1));
|
||||
}
|
||||
subdevice<xbox_eeprom_device>("pci:01.1:154")->hack_eeprom =
|
||||
[&](void)
|
||||
|
@ -78,7 +78,7 @@ give the leftmost column of the rectangle, the next four give the next column, a
|
||||
|
||||
#define DEBUG_SET(flags) ((m_debug_video & (flags))==(flags))
|
||||
|
||||
void mbc55x_state::video_debug(int ref, const std::vector<std::string> ¶ms)
|
||||
void mbc55x_state::video_debug(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() > 0)
|
||||
{
|
||||
@ -197,7 +197,7 @@ void mbc55x_state::video_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("mbc55x_vid_debug", CMDFLAG_NONE, 0, 0, 1, std::bind(&mbc55x_state::video_debug, this, _1, _2));
|
||||
machine().debugger().console().register_command("mbc55x_vid_debug", CMDFLAG_NONE, 0, 1, std::bind(&mbc55x_state::video_debug, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,22 +72,22 @@ void midtunit_video_device::debug_init()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("midblit", CMDFLAG_CUSTOM_HELP, 0, 1, 4, std::bind(&midtunit_video_device::debug_commands, this, _1, _2));
|
||||
machine().debugger().console().register_command("midblit", CMDFLAG_CUSTOM_HELP, 1, 4, std::bind(&midtunit_video_device::debug_commands, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
void midtunit_video_device::debug_commands(int ref, const std::vector<std::string> ¶ms)
|
||||
void midtunit_video_device::debug_commands(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() < 1)
|
||||
return;
|
||||
|
||||
if (params[0] == "pngdma")
|
||||
debug_png_dma_command(ref, params);
|
||||
debug_png_dma_command(params);
|
||||
else
|
||||
debug_help_command(ref, params);
|
||||
debug_help_command(params);
|
||||
}
|
||||
|
||||
void midtunit_video_device::debug_help_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void midtunit_video_device::debug_help_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
@ -96,7 +96,7 @@ void midtunit_video_device::debug_help_command(int ref, const std::vector<std::s
|
||||
con.printf(" midblit help -- this list\n");
|
||||
}
|
||||
|
||||
void midtunit_video_device::debug_png_dma_command(int ref, const std::vector<std::string> ¶ms)
|
||||
void midtunit_video_device::debug_png_dma_command(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
debugger_console &con = machine().debugger().console();
|
||||
|
||||
|
@ -173,9 +173,9 @@ protected:
|
||||
bitmap_argb32 m_log_bitmap;
|
||||
|
||||
void debug_init();
|
||||
void debug_commands(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_help_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_png_dma_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void debug_commands(const std::vector<std::string> ¶ms);
|
||||
void debug_help_command(const std::vector<std::string> ¶ms);
|
||||
void debug_png_dma_command(const std::vector<std::string> ¶ms);
|
||||
void log_bitmap(int command, int bpp, bool skip);
|
||||
};
|
||||
|
||||
|
@ -474,7 +474,7 @@ void rmnimbus_state::change_palette(uint8_t bank, uint16_t colours)
|
||||
}
|
||||
}
|
||||
|
||||
void rmnimbus_state::video_debug(int ref, const std::vector<std::string> ¶ms)
|
||||
void rmnimbus_state::video_debug(const std::vector<std::string> ¶ms)
|
||||
{
|
||||
if (params.size() > 0)
|
||||
{
|
||||
@ -498,7 +498,7 @@ void rmnimbus_state::video_start()
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
machine().debugger().console().register_command("nimbus_vid_debug", CMDFLAG_NONE, 0, 0, 1, std::bind(&rmnimbus_state::video_debug, this, _1, _2));
|
||||
machine().debugger().console().register_command("nimbus_vid_debug", CMDFLAG_NONE, 0, 1, std::bind(&rmnimbus_state::video_debug, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user