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/emu/cpu/pdp1/pdp1.c | 2 +- src/emu/cpu/pdp1/pdp1.h | 4 ++-- src/emu/cpu/pdp1/tx0.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/emu/cpu/pdp1') diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index f2e68e67609..e5c37532c87 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -1707,7 +1707,7 @@ static void null_iot(device_t *device, int op2, int nac, int mb, int *io, int ac if (LOG_IOT_EXTRA) { if (op2 == 000) - logerror("IOT sync instruction: mb=0%06o, pc=0%06o\n", (unsigned) mb, (unsigned) cpu_get_reg(device, PDP1_PC)); + logerror("IOT sync instruction: mb=0%06o, pc=0%06o\n", (unsigned) mb, (unsigned) device->state().state_int(PDP1_PC)); } if (LOG) { diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h index 7e31766b209..ddf6d9b2fe5 100644 --- a/src/emu/cpu/pdp1/pdp1.h +++ b/src/emu/cpu/pdp1/pdp1.h @@ -19,8 +19,8 @@ enum PDP1_IO_COMPLETE /* hack, do not use directly, use pdp1_pulse_iot_done instead */ }; -#define pdp1_pulse_start_clear(cpudevice) cpu_set_reg(cpudevice, PDP1_START_CLEAR, (UINT64)0) -#define pdp1_pulse_iot_done(cpudevice) cpu_set_reg(cpudevice, PDP1_IO_COMPLETE, (UINT64)0) +#define pdp1_pulse_start_clear(cpudevice) (cpudevice)->state().set_state_int(PDP1_START_CLEAR, (UINT64)0) +#define pdp1_pulse_iot_done(cpudevice) (cpudevice)->state().set_state_int(PDP1_IO_COMPLETE, (UINT64)0) typedef void (*pdp1_extern_iot_func)(device_t *device, int op2, int nac, int mb, int *io, int ac); typedef void (*pdp1_read_binary_word_func)(device_t *device); diff --git a/src/emu/cpu/pdp1/tx0.h b/src/emu/cpu/pdp1/tx0.h index d36c48082e0..3e94f8f5a0b 100644 --- a/src/emu/cpu/pdp1/tx0.h +++ b/src/emu/cpu/pdp1/tx0.h @@ -20,8 +20,8 @@ enum TX0_IO_COMPLETE /* hack, do not use directly, use tx0_pulse_io_complete instead */ }; -#define tx0_pulse_reset(cpudevice) cpu_set_reg(cpudevice, TX0_RESET, 0) -#define tx0_pulse_io_complete(cpudevice) cpu_set_reg(cpudevice, TX0_IO_COMPLETE, 0) +#define tx0_pulse_reset(cpudevice) (cpudevice)->state().set_state_int(TX0_RESET, 0) +#define tx0_pulse_io_complete(cpudevice) (cpudevice)->state().set_state_int(TX0_IO_COMPLETE, 0) typedef struct _tx0_reset_param_t tx0_reset_param_t; struct _tx0_reset_param_t -- cgit v1.2.3-70-g09d2