mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
apollo_kbd.cpp: Eliminate firstcpu usage (nw)
This commit is contained in:
parent
670a046319
commit
be48503e92
@ -266,26 +266,13 @@ void apollo_kbd_device::device_reset()
|
||||
cpu_context - return a string describing the current CPU context
|
||||
***************************************************************************/
|
||||
|
||||
const char *apollo_kbd_device::cpu_context()
|
||||
std::string apollo_kbd_device::cpu_context() const
|
||||
{
|
||||
static char statebuf[64]; /* string buffer containing state description */
|
||||
|
||||
device_t *cpu = machine().firstcpu;
|
||||
osd_ticks_t t = osd_ticks();
|
||||
int s = (t / osd_ticks_per_second()) % 3600;
|
||||
int ms = (t / (osd_ticks_per_second() / 1000)) % 1000;
|
||||
|
||||
/* if we have an executing CPU, output data */
|
||||
if (cpu != nullptr)
|
||||
{
|
||||
sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(),
|
||||
cpu->safe_pcbase(), tag());
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(statebuf, "%d.%03d", s, ms);
|
||||
}
|
||||
return statebuf;
|
||||
return string_format("%d.%03d %s", s, ms, machine().describe_context());
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -65,7 +65,7 @@ private:
|
||||
|
||||
TIMER_CALLBACK_MEMBER( kbd_scan_timer );
|
||||
|
||||
const char *cpu_context() ;
|
||||
std::string cpu_context() const;
|
||||
template <typename Format, typename... Params>
|
||||
void logerror(Format &&fmt, Params &&... args) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user