From 0aa418e85b7f7aad5088bc96c9da0c371b15b2f2 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 11 Sep 2012 15:58:04 +0000 Subject: In device_state_interface, rename state() to state_int() and set_state() to set_state_int() for consistency. Update all callers. Also add set_pc() helper and updated all callers to use that instead of set_state_int(STATE_GENPC) [Aaron Giles] Added device_t::state() method to get the state interface. Added redundant device_state_interface::state() method to catch redundant use of it. [Aaron Giles] Removed cpu_get_reg() and cpu_set_reg() macros in favor of using the above methods. [Aaron Giles] --- src/mess/drivers/bigbord2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/mess/drivers/bigbord2.c') diff --git a/src/mess/drivers/bigbord2.c b/src/mess/drivers/bigbord2.c index 0552a7ebaed..33eefd55694 100644 --- a/src/mess/drivers/bigbord2.c +++ b/src/mess/drivers/bigbord2.c @@ -185,14 +185,14 @@ WRITE8_MEMBER( bigbord2_state::bigbord2_kbd_put ) { // simulate interrupt by saving current pc on // the stack and jumping to interrupt handler. - UINT16 spreg = cpu_get_reg(m_maincpu, Z80_SP); - UINT16 pcreg = cpu_get_reg(m_maincpu, Z80_PC); + UINT16 spreg = m_maincpu->state_int(Z80_SP); + UINT16 pcreg = m_maincpu->state_int(Z80_PC); spreg--; space.write_byte(spreg, pcreg >> 8); spreg--; space.write_byte(spreg, pcreg); - cpu_set_reg(m_maincpu, Z80_SP, spreg); - cpu_set_reg(m_maincpu, Z80_PC, 0xF120); + m_maincpu->set_state_int(Z80_SP, spreg); + m_maincpu->set_state_int(Z80_PC, 0xF120); } } } @@ -424,14 +424,14 @@ WRITE_LINE_MEMBER( bigbord2_state::frame ) framecnt = 0; // simulate interrupt by saving current pc on // the stack and jumping to interrupt handler. - UINT16 spreg = cpu_get_reg(m_maincpu, Z80_SP); - UINT16 pcreg = cpu_get_reg(m_maincpu, Z80_PC); + UINT16 spreg = m_maincpu->state_int(Z80_SP); + UINT16 pcreg = m_maincpu->state_int(Z80_PC); spreg--; space->write_byte(spreg, pcreg >> 8); spreg--; space->write_byte(spreg, pcreg); - cpu_set_reg(m_maincpu, Z80_SP, spreg); - cpu_set_reg(m_maincpu, Z80_PC, 0xF18E); + m_maincpu->set_state_int(Z80_SP, spreg); + m_maincpu->set_state_int(Z80_PC, 0xF18E); } } -- cgit v1.2.3-70-g09d2