summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/apollo.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-17 08:22:16 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-17 08:22:16 +0000
commit3cce7e019e095296b5ce2bb45d19b1209bed961d (patch)
tree4fa76260ac2dee5878fbba70d759ba6a1d4d76bf /src/mess/machine/apollo.c
parent22b4739aded17790b3f1bf31b9da8ff9e6a0860c (diff)
Memory handler normalization, part 2. Change legacy
read/write handlers to take an address_space & instead of an address_space *. Also update pretty much all other functions to take a reference where appropriate. [Aaron Giles]
Diffstat (limited to 'src/mess/machine/apollo.c')
-rw-r--r--src/mess/machine/apollo.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mess/machine/apollo.c b/src/mess/machine/apollo.c
index 8f37bd314e6..5172a1571a8 100644
--- a/src/mess/machine/apollo.c
+++ b/src/mess/machine/apollo.c
@@ -826,20 +826,20 @@ WRITE8_DEVICE_HANDLER(apollo_ptm_w) {
***************************************************************************/
static DEVICE_RESET( apollo_rtc ) {
- address_space *space = device->machine().device(MAINCPU)->memory().space(AS_PROGRAM);
+ address_space &space = *device->machine().device(MAINCPU)->memory().space(AS_PROGRAM);
apollo_state *state = device->machine().driver_data<apollo_state>();
- UINT8 year = state->apollo_rtc_r(*space, 9);
+ UINT8 year = state->apollo_rtc_r(space, 9);
// change year according to configuration settings
if (year < 20 && apollo_config(APOLLO_CONF_DATE_1990))
{
year+=80;
- state->apollo_rtc_w(*space, 9, year);
+ state->apollo_rtc_w(space, 9, year);
}
else if (year >= 80 && !apollo_config(APOLLO_CONF_DATE_1990))
{
year -=80;
- state->apollo_rtc_w(*space, 9, year);
+ state->apollo_rtc_w(space, 9, year);
}
//SLOG1(("reset apollo_rtc year=%d", year));
@@ -872,13 +872,13 @@ READ8_MEMBER(apollo_state::apollo_rtc_r)
static TIMER_CALLBACK( apollo_rtc_timer )
{
apollo_state *state = machine.driver_data<apollo_state>();
- address_space *space = machine.device(MAINCPU)->memory().space(AS_PROGRAM);
+ address_space &space = *machine.device(MAINCPU)->memory().space(AS_PROGRAM);
// FIXME: reading register 0x0c will clear all interrupt flags
- if ((state->apollo_rtc_r(*space, 0x0c) & 0x80))
+ if ((state->apollo_rtc_r(space, 0x0c) & 0x80))
{
//SLOG2(("apollo_rtc_timer - set_irq_line %d", APOLLO_IRQ_RTC));
- apollo_pic_set_irq_line(&space->device(), APOLLO_IRQ_RTC, 1);
+ apollo_pic_set_irq_line(&space.device(), APOLLO_IRQ_RTC, 1);
}
}
@@ -1343,11 +1343,11 @@ static DEVICE_RESET( apollo_fdc ) {
WRITE8_MEMBER(apollo_state::apollo_fdc_w){
SLOG1(("writing FDC upd765 at offset %X = %02x", offset, data));
- pc_fdc_w(&space, offset, data);
+ pc_fdc_w(space, offset, data);
}
READ8_MEMBER(apollo_state::apollo_fdc_r){
- UINT8 data = pc_fdc_r(&space, offset);
+ UINT8 data = pc_fdc_r(space, offset);
SLOG1(("reading FDC upd765 at offset %X = %02x", offset, data));
return data;
}