diff options
author | 2012-09-11 15:58:04 +0000 | |
---|---|---|
committer | 2012-09-11 15:58:04 +0000 | |
commit | 0aa418e85b7f7aad5088bc96c9da0c371b15b2f2 (patch) | |
tree | e13bbdf8a2ff82faf97aaa23351668d817628966 /src/mess/video/galaxy.c | |
parent | 6d8c3c9f2d5d30848751a12c2925fbe53ac8bfec (diff) |
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]
Diffstat (limited to 'src/mess/video/galaxy.c')
-rw-r--r-- | src/mess/video/galaxy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mess/video/galaxy.c b/src/mess/video/galaxy.c index 52b5bd6aa17..c62c3922d95 100644 --- a/src/mess/video/galaxy.c +++ b/src/mess/video/galaxy.c @@ -25,11 +25,11 @@ static TIMER_CALLBACK( gal_video ) if ((state->m_gal_cnt >= 48 * 2) && (state->m_gal_cnt < 48 * 210)) // display on screen just state->m_first 208 lines { UINT8 mode = (state->m_latch_value >> 1) & 1; // bit 2 latch represents mode - UINT16 addr = (cpu_get_reg(machine.device("maincpu"), Z80_I) << 8) | cpu_get_reg(machine.device("maincpu"), Z80_R) | ((state->m_latch_value & 0x80) ^ 0x80); + UINT16 addr = (machine.device("maincpu")->state().state_int(Z80_I) << 8) | machine.device("maincpu")->state().state_int(Z80_R) | ((state->m_latch_value & 0x80) ^ 0x80); if (mode == 0) { // Text mode - if (state->m_first == 0 && (cpu_get_reg(machine.device("maincpu"), Z80_R) & 0x1f) == 0) + if (state->m_first == 0 && (machine.device("maincpu")->state().state_int(Z80_R) & 0x1f) == 0) { // Due to a fact that on real processor latch value is set at // the end of last cycle we need to skip dusplay of double @@ -58,7 +58,7 @@ static TIMER_CALLBACK( gal_video ) } else { // Graphics mode - if (state->m_first < 4 && (cpu_get_reg(machine.device("maincpu"), Z80_R) & 0x1f) == 0) + if (state->m_first < 4 && (machine.device("maincpu")->state().state_int(Z80_R) & 0x1f) == 0) { // Due to a fact that on real processor latch value is set at // the end of last cycle we need to skip dusplay of 4 times |