diff options
author | 2008-03-05 07:45:34 +0000 | |
---|---|---|
committer | 2008-03-05 07:45:34 +0000 | |
commit | ee0a5642ab9019f040132a2087872d87e3ddf026 (patch) | |
tree | 60614d661eb04699242798e5965b9c732dfd5bd5 /src/emu/cpu/m6502/m65ce02.c | |
parent | 9f03451a61e6d5541035462cd32c1f88eb68e9a5 (diff) |
Added running_machine * parameter to the front of all read/write handlers.
Updated all call-through handlers appropriately. Renamed read8_handler to
read8_machine_func, replicating this pattern throughout.
Defined new set of memory handler functions which are similar but which
pass a const device_config * in place of the running_machine *. These are
called read8_device_func, etc. Added macros READ8_DEVICE_HANDLER() for
specifying functions of this type. Note that some plumbing still needs to
happen in memory.c before this will work.
This check-in should remove the need for the global Machine and in turn
"deprecat.h" for a lot of drivers, but that work has not been done. On
the flip side, some new accesses to the global Machine were added in the
emu/ files. These should be addressed over time, but are smaller in
number than the references in the driver.
Diffstat (limited to 'src/emu/cpu/m6502/m65ce02.c')
-rw-r--r-- | src/emu/cpu/m6502/m65ce02.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c index 5aab6f54425..6b4114e338f 100644 --- a/src/emu/cpu/m6502/m65ce02.c +++ b/src/emu/cpu/m6502/m65ce02.c @@ -74,8 +74,8 @@ typedef struct { UINT8 nmi_state; UINT8 irq_state; int (*irq_callback)(int irqline); /* IRQ callback */ - read8_handler rdmem_id; /* readmem callback for indexed instructions */ - write8_handler wrmem_id; /* writemem callback for indexed instructions */ + read8_machine_func rdmem_id; /* readmem callback for indexed instructions */ + write8_machine_func wrmem_id; /* writemem callback for indexed instructions */ } m65ce02_Regs; @@ -260,8 +260,8 @@ static void m65ce02_set_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_REGISTER + M65CE02_ZP: m65ce02.zp.b.l = info->i; break; /* --- the following bits of info are set as pointers to data or functions --- */ - case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m65ce02.rdmem_id = (read8_handler) info->f; break; - case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m65ce02.wrmem_id = (write8_handler) info->f; break; + case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m65ce02.rdmem_id = (read8_machine_func) info->f; break; + case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m65ce02.wrmem_id = (write8_machine_func) info->f; break; } } |