diff options
author | 2012-09-19 19:48:09 +0000 | |
---|---|---|
committer | 2012-09-19 19:48:09 +0000 | |
commit | 621ac620ae1ca743a66bb52aaf5478da01c3bac6 (patch) | |
tree | 2743a87e9077417af7546970d1ea1cc3b8781a63 /src/mess/drivers/p8k.c | |
parent | 33c77e65bbd4513957f2ece623cee476cf439248 (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/mess/drivers/p8k.c')
-rw-r--r-- | src/mess/drivers/p8k.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mess/drivers/p8k.c b/src/mess/drivers/p8k.c index 075b07dc857..bbdf2c5a038 100644 --- a/src/mess/drivers/p8k.c +++ b/src/mess/drivers/p8k.c @@ -513,12 +513,12 @@ static WRITE16_DEVICE_HANDLER( p8k_16_pio_w ) static READ16_DEVICE_HANDLER( p8k_16_ctc_r ) { - return (UINT16)downcast<z80ctc_device *>(device)->read(*device->machine().memory().first_space(),(offset & 0x06) >> 1); + return (UINT16)downcast<z80ctc_device *>(device)->read(device->machine().driver_data()->generic_space(),(offset & 0x06) >> 1); } static WRITE16_DEVICE_HANDLER( p8k_16_ctc_w ) { - downcast<z80ctc_device *>(device)->write(*device->machine().memory().first_space(), (offset & 0x06) >> 1, (UINT8)(data & 0xff)); + downcast<z80ctc_device *>(device)->write(device->machine().driver_data()->generic_space(), (offset & 0x06) >> 1, (UINT8)(data & 0xff)); } READ16_MEMBER( p8k_state::portff82_r ) |