summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/viper.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/mame/drivers/viper.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/mame/drivers/viper.c')
-rw-r--r--src/mame/drivers/viper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mame/drivers/viper.c b/src/mame/drivers/viper.c
index fee8f6a512c..7b198ede31e 100644
--- a/src/mame/drivers/viper.c
+++ b/src/mame/drivers/viper.c
@@ -2026,15 +2026,15 @@ MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(viper_state,viper)
{
-// machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler( *ide, 0xff200000, 0xff207fff, FUNC(hdd_r), FUNC(hdd_w) ); //TODO
+// machine().device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler( *ide, 0xff200000, 0xff207fff, FUNC(hdd_r), FUNC(hdd_w) ); //TODO
}
DRIVER_INIT_MEMBER(viper_state,vipercf)
{
DRIVER_INIT_CALL(viper);
- machine().device("maincpu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0xff000000, 0xff000fff, read64_delegate(FUNC(viper_state::cf_card_data_r), this), write64_delegate(FUNC(viper_state::cf_card_data_w), this) );
- machine().device("maincpu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0xff200000, 0xff200fff, read64_delegate(FUNC(viper_state::cf_card_r), this), write64_delegate(FUNC(viper_state::cf_card_w), this) );
+ machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xff000000, 0xff000fff, read64_delegate(FUNC(viper_state::cf_card_data_r), this), write64_delegate(FUNC(viper_state::cf_card_data_w), this) );
+ machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xff200000, 0xff200fff, read64_delegate(FUNC(viper_state::cf_card_r), this), write64_delegate(FUNC(viper_state::cf_card_w), this) );
}