diff options
author | 2010-08-19 16:10:19 +0000 | |
---|---|---|
committer | 2010-08-19 16:10:19 +0000 | |
commit | 621a2faa2a384ccea46ee3630c57961b92070ed7 (patch) | |
tree | 960fd0c5fbc1b8fcc3b07ff2cc538048eaa7b9af /src/emu/cpu/m6805 | |
parent | 9bbc2e2f00ac611c79969db389043cd035e4215d (diff) |
Remove final set of legacy inlines from memory.h. Mostly affects CPU
cores, which all now cache a copy of space->direct() and use it for
direct accesses.
Diffstat (limited to 'src/emu/cpu/m6805')
-rw-r--r-- | src/emu/cpu/m6805/m6805.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index 90150d9c5e5..b977d0bb45b 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -63,6 +63,7 @@ typedef struct device_irq_callback irq_callback; legacy_cpu_device *device; address_space *program; + direct_read_data *direct; int irq_state[9]; /* KW Additional lines for HD63705 */ int nmi_state; } m6805_Regs; @@ -91,14 +92,14 @@ INLINE m6805_Regs *get_safe_token(running_device *device) /* opcodes. In case of system with memory mapped I/O, this function can be */ /* used to greatly speed up emulation */ /****************************************************************************/ -#define M6805_RDOP(Addr) ((unsigned)memory_decrypted_read_byte(cpustate->program, Addr)) +#define M6805_RDOP(Addr) ((unsigned)cpustate->direct->read_decrypted_byte(Addr)) /****************************************************************************/ /* M6805_RDOP_ARG() is identical to M6805_RDOP() but it's used for reading */ /* opcode arguments. This difference can be used to support systems that */ /* use different encoding mechanisms for opcodes and opcode arguments */ /****************************************************************************/ -#define M6805_RDOP_ARG(Addr) ((unsigned)memory_raw_read_byte(cpustate->program, Addr)) +#define M6805_RDOP_ARG(Addr) ((unsigned)cpustate->direct->read_raw_byte(Addr)) #define SUBTYPE cpustate->subtype /* CPU Type */ #define SP_MASK cpustate->sp_mask /* stack pointer mask */ @@ -459,6 +460,7 @@ static CPU_INIT( m6805 ) cpustate->irq_callback = irqcallback; cpustate->device = device; cpustate->program = device->space(AS_PROGRAM); + cpustate->direct = &cpustate->program->direct(); } static CPU_RESET( m6805 ) @@ -472,6 +474,7 @@ static CPU_RESET( m6805 ) cpustate->irq_callback = save_irqcallback; cpustate->device = device; cpustate->program = device->space(AS_PROGRAM); + cpustate->direct = &cpustate->program->direct(); /* Force CPU sub-type and relevant masks */ cpustate->subtype = SUBTYPE_M6805; |