From 621ac620ae1ca743a66bb52aaf5478da01c3bac6 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 19 Sep 2012 19:48:09 +0000 Subject: 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. --- src/mess/machine/radio86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mess/machine/radio86.c') diff --git a/src/mess/machine/radio86.c b/src/mess/machine/radio86.c index b03e7a67996..e397d33d589 100644 --- a/src/mess/machine/radio86.c +++ b/src/mess/machine/radio86.c @@ -168,12 +168,12 @@ READ8_MEMBER(radio86_state::radio_cpu_state_r) READ8_MEMBER(radio86_state::radio_io_r) { - return machine().device("maincpu")->memory().space(AS_PROGRAM)->read_byte((offset << 8) + offset); + return machine().device("maincpu")->memory().space(AS_PROGRAM).read_byte((offset << 8) + offset); } WRITE8_MEMBER(radio86_state::radio_io_w) { - machine().device("maincpu")->memory().space(AS_PROGRAM)->write_byte((offset << 8) + offset,data); + machine().device("maincpu")->memory().space(AS_PROGRAM).write_byte((offset << 8) + offset,data); } MACHINE_RESET_MEMBER(radio86_state,radio86) -- cgit v1.2.3-70-g09d2