mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
distate: Expose state_find_entry (nw)
This commit is contained in:
parent
b5c19e9fb2
commit
1a66b2ff1e
@ -467,7 +467,7 @@ bool debugger_commands::validate_cpu_parameter(const char *param, device_t *&res
|
|||||||
{
|
{
|
||||||
// real CPUs should have pcbase
|
// real CPUs should have pcbase
|
||||||
const device_state_interface *state;
|
const device_state_interface *state;
|
||||||
if (exec.device().interface(state) && state->state_string(STATE_GENPCBASE) != "???" && index++ == cpunum)
|
if (exec.device().interface(state) && state->state_find_entry(STATE_GENPCBASE) != nullptr && index++ == cpunum)
|
||||||
{
|
{
|
||||||
result = &exec.device();
|
result = &exec.device();
|
||||||
return true;
|
return true;
|
||||||
|
@ -250,6 +250,9 @@ public:
|
|||||||
void set_state_string(int index, const char *string);
|
void set_state_string(int index, const char *string);
|
||||||
void set_pc(offs_t pc) { set_state_int(STATE_GENPC, pc); }
|
void set_pc(offs_t pc) { set_state_int(STATE_GENPC, pc); }
|
||||||
|
|
||||||
|
// find the entry for a given index
|
||||||
|
const device_state_entry *state_find_entry(int index) const;
|
||||||
|
|
||||||
// deliberately ambiguous functions; if you have the state interface
|
// deliberately ambiguous functions; if you have the state interface
|
||||||
// just use it directly
|
// just use it directly
|
||||||
device_state_interface &state() { return *this; }
|
device_state_interface &state() { return *this; }
|
||||||
@ -293,9 +296,6 @@ protected:
|
|||||||
// internal operation overrides
|
// internal operation overrides
|
||||||
virtual void interface_post_start() override;
|
virtual void interface_post_start() override;
|
||||||
|
|
||||||
// find the entry for a given index
|
|
||||||
const device_state_entry *state_find_entry(int index) const;
|
|
||||||
|
|
||||||
// constants
|
// constants
|
||||||
static constexpr int FAST_STATE_MIN = -4; // range for fast state
|
static constexpr int FAST_STATE_MIN = -4; // range for fast state
|
||||||
static constexpr int FAST_STATE_MAX = 256; // lookups
|
static constexpr int FAST_STATE_MAX = 256; // lookups
|
||||||
|
Loading…
Reference in New Issue
Block a user