mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
remove unnecessary formatstr() & fix setting PC (nw)
This commit is contained in:
parent
5611934cf2
commit
e219ed72d1
@ -176,7 +176,7 @@ void am29000_cpu_device::device_start()
|
||||
save_item(NAME(m_next_pc));
|
||||
|
||||
// Register state for debugger
|
||||
state_add( AM29000_PC, "PC", m_pc ).formatstr("%08X");
|
||||
state_add( AM29000_PC, "PC", m_pc ).callimport().formatstr("%08X");
|
||||
state_add( AM29000_VAB, "VAB", m_vab ).formatstr("%08X");
|
||||
state_add( AM29000_OPS, "OPS", m_ops ).formatstr("%08X");
|
||||
state_add( AM29000_CPS, "CPS", m_cps ).formatstr("%08X");
|
||||
@ -397,14 +397,35 @@ void am29000_cpu_device::device_start()
|
||||
state_add( AM29000_R254, "R254", m_r[254] ).formatstr("%08X");
|
||||
state_add( AM29000_R255, "R255", m_r[255] ).formatstr("%08X");
|
||||
|
||||
state_add(STATE_GENPC, "GENPC", m_pc).formatstr("%08X").noshow();
|
||||
state_add(STATE_GENPCBASE, "CURPC", m_pc).formatstr("%08X").noshow();
|
||||
state_add(STATE_GENFLAGS, "GENFLAGS", m_alu).formatstr("%13s").noshow();
|
||||
state_add(STATE_GENPCBASE, "CURPC", m_pc).callimport().noshow();
|
||||
state_add(STATE_GENFLAGS, "CURFLAGS", m_alu).formatstr("%13s").noshow();
|
||||
|
||||
m_icountptr = &m_icount;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// state_import - import state into the device,
|
||||
// after it has been set
|
||||
//-------------------------------------------------
|
||||
|
||||
void am29000_cpu_device::state_import(const device_state_entry &entry)
|
||||
{
|
||||
switch (entry.index())
|
||||
{
|
||||
case AM29000_PC:
|
||||
case STATE_GENPCBASE:
|
||||
m_next_pc = m_pc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// state_string_export - export state as a string
|
||||
// for the debugger
|
||||
//-------------------------------------------------
|
||||
|
||||
void am29000_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
|
||||
{
|
||||
switch (entry.index())
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
enum
|
||||
{
|
||||
AM29000_PC = 1,
|
||||
AM29000_VAB,
|
||||
AM29000_PC = STATE_GENPC,
|
||||
AM29000_VAB = 0,
|
||||
AM29000_OPS,
|
||||
AM29000_CPS,
|
||||
AM29000_CFG,
|
||||
@ -462,7 +462,8 @@ protected:
|
||||
}
|
||||
|
||||
// device_state_interface overrides
|
||||
void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
||||
|
@ -1298,7 +1298,7 @@ void am29000_cpu_device::CALL()
|
||||
m_next_pc = m_exec_pc + JMP_SEX;
|
||||
|
||||
m_r[RA] = ret;
|
||||
m_next_pl_flags |= PFLAG_JUMP;
|
||||
m_next_pl_flags |= PFLAG_JUMP;
|
||||
}
|
||||
|
||||
void am29000_cpu_device::CALLI()
|
||||
|
Loading…
Reference in New Issue
Block a user