Fix some oversights in previous changes, sorry guys'n'gals

This commit is contained in:
Vas Crabb 2016-03-02 22:22:24 +11:00
parent f7df7553f0
commit 66d0ef8ed4
3 changed files with 14 additions and 14 deletions

View File

@ -1329,7 +1329,7 @@ static void execute_bplist(running_machine &machine, int ref, int params, const
/* loop over the breakpoints */
for (device_debug::breakpoint *bp = device->debug()->breakpoint_first(); bp != nullptr; bp = bp->next())
{
buffer = string_format("%c%4X @ %*X", bp->enabled() ? ' ' : 'D', bp->index(), device->debug()->logaddrchars(), bp->address());
buffer = string_format("%c%4X @ %0*X", bp->enabled() ? ' ' : 'D', bp->index(), device->debug()->logaddrchars(), bp->address());
if (std::string(bp->condition()).compare("1") != 0)
buffer.append(string_format(" if %s", bp->condition()));
if (std::string(bp->action()).compare("") != 0)
@ -1496,7 +1496,7 @@ static void execute_wplist(running_machine &machine, int ref, int params, const
/* loop over the watchpoints */
for (device_debug::watchpoint *wp = device->debug()->watchpoint_first(spacenum); wp != nullptr; wp = wp->next())
{
buffer = string_format("%c%4X @ %*X-%*X %s", wp->enabled() ? ' ' : 'D', wp->index(),
buffer = string_format("%c%4X @ %0*X-%0*X %s", wp->enabled() ? ' ' : 'D', wp->index(),
wp->space().addrchars(), wp->space().byte_to_address(wp->address()),
wp->space().addrchars(), wp->space().byte_to_address_end(wp->address() + wp->length()) - 1,
types[wp->type() & 3]);
@ -2308,9 +2308,9 @@ static void execute_cheatlist(running_machine &machine, int ref, int params, con
output.clear();
stream_format(
output,
" <cheat desc=\"Possibility %d : %*X (%*X)\">\n"
" <cheat desc=\"Possibility %d : %0*X (%0*X)\">\n"
" <script state=\"run\">\n"
" <action>%s.p%c%c@%*X=%*X</action>\n"
" <action>%s.p%c%c@%0*X=%0*X</action>\n"
" </script>\n"
" </cheat>\n\n",
active_cheat, space->logaddrchars(), address, cheat.width * 2, value,
@ -2321,7 +2321,7 @@ static void execute_cheatlist(running_machine &machine, int ref, int params, con
else
{
debug_console_printf(
machine, "Address=%*X Start=%*X Current=%*X\n",
machine, "Address=%0*X Start=%0*X Current=%0*X\n",
space->logaddrchars(), address,
cheat.width * 2, cheat_byte_swap(&cheat, cheat.cheatmap[cheatindex].first_value) & sizemask,
cheat.width * 2, value);
@ -2452,7 +2452,7 @@ static void execute_find(running_machine &machine, int ref, int params, const ch
if (match)
{
found++;
debug_console_printf(machine, "Found at %*X\n", space->addrchars(), (UINT32)space->byte_to_address(i));
debug_console_printf(machine, "Found at %0*X\n", space->addrchars(), (UINT32)space->byte_to_address(i));
}
}
@ -2701,7 +2701,7 @@ static void execute_history(running_machine &machine, int ref, int params, const
char buffer[200];
debug->disassemble(buffer, pc, opbuf, argbuf);
debug_console_printf(machine, "%*X: %s\n", space->logaddrchars(), pc, buffer);
debug_console_printf(machine, "%0*X: %s\n", space->logaddrchars(), pc, buffer);
}
}
@ -2908,14 +2908,14 @@ static void execute_map(running_machine &machine, int ref, int params, const cha
{
const char *mapname = space->get_handler_string((intention == TRANSLATE_WRITE_DEBUG) ? ROW_WRITE : ROW_READ, taddress);
debug_console_printf(
machine, "%7s: %*X logical == %*X physical -> %s\n",
machine, "%7s: %0*X logical == %0*X physical -> %s\n",
intnames[intention & 3],
space->logaddrchars(), address,
space->addrchars(), space->byte_to_address(taddress),
mapname);
}
else
debug_console_printf(machine, "%7s: %*X logical is unmapped\n", intnames[intention & 3], space->logaddrchars(), address);
debug_console_printf(machine, "%7s: %0*X logical is unmapped\n", intnames[intention & 3], space->logaddrchars(), address);
}
}

View File

@ -181,7 +181,7 @@ const char *running_machine::describe_context()
if (cpu != nullptr)
{
address_space &prg = cpu->space(AS_PROGRAM);
m_context = string_format(prg.is_octal() ? "'%s' (%*o)" : "'%s' (%*X)", cpu->tag(), prg.logaddrchars(), cpu->pc());
m_context = string_format(prg.is_octal() ? "'%s' (%0*o)" : "'%s' (%0*X)", cpu->tag(), prg.logaddrchars(), cpu->pc());
}
}
else

View File

@ -675,8 +675,8 @@ private:
{
m_space.device().logerror(
m_space.is_octal()
? "%s: unmapped %s memory read from %*o & %*o\n"
: "%s: unmapped %s memory read from %*X & %*X\n",
? "%s: unmapped %s memory read from %0*o & %0*o\n"
: "%s: unmapped %s memory read from %0*X & %0*X\n",
m_space.machine().describe_context(), m_space.name(),
m_space.addrchars(), m_space.byte_to_address(offset * sizeof(_UintType)),
2 * sizeof(_UintType), mask);
@ -746,8 +746,8 @@ private:
{
m_space.device().logerror(
m_space.is_octal()
? "%s: unmapped %s memory write to %*o = %*o & %*o\n"
: "%s: unmapped %s memory write to %*X = %*X & %*X\n",
? "%s: unmapped %s memory write to %0*o = %0*o & %0*o\n"
: "%s: unmapped %s memory write to %0*X = %0*X & %0*X\n",
m_space.machine().describe_context(), m_space.name(),
m_space.addrchars(), m_space.byte_to_address(offset * sizeof(_UintType)),
2 * sizeof(_UintType), data,