summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/m6502/m6502.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-19 19:48:09 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-19 19:48:09 +0000
commit621ac620ae1ca743a66bb52aaf5478da01c3bac6 (patch)
tree2743a87e9077417af7546970d1ea1cc3b8781a63 /src/emu/cpu/m6502/m6502.c
parent33c77e65bbd4513957f2ece623cee476cf439248 (diff)
Since nobody checks for NULLs anyway, make
device_memory_interface::space() assert against NULL and return a reference, and pushed references throughout all address space usage in the system. Added a has_space() method to check for those rare case when it is ambiguous. [Aaron Giles] Also reinstated the generic space and added fatal error handlers if anyone tries to actually read/write from it.
Diffstat (limited to 'src/emu/cpu/m6502/m6502.c')
-rw-r--r--src/emu/cpu/m6502/m6502.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c
index 38bd935763e..d7dd22e8d5d 100644
--- a/src/emu/cpu/m6502/m6502.c
+++ b/src/emu/cpu/m6502/m6502.c
@@ -136,7 +136,7 @@ static void m6502_common_init(legacy_cpu_device *device, device_irq_acknowledge_
cpustate->irq_callback = irqcallback;
cpustate->device = device;
- cpustate->space = device->space(AS_PROGRAM);
+ cpustate->space = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->space->direct();
cpustate->subtype = subtype;
cpustate->insn = insn;
@@ -548,7 +548,7 @@ static CPU_INIT( deco16 )
{
m6502_Regs *cpustate = get_safe_token(device);
m6502_common_init(device, irqcallback, SUBTYPE_DECO16, insndeco16, "deco16");
- cpustate->io = device->space(AS_IO);
+ cpustate->io = &device->space(AS_IO);
}