From fb2c2710e8b632786e3a60cf3fe20fea955e5be4 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 2 Jan 2018 16:12:07 -0500 Subject: [PATCH] astrocde: More space.device elimination (nw) --- src/mame/includes/astrocde.h | 2 +- src/mame/video/astrocde.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index e30d142960c..ed3872b854b 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -189,7 +189,7 @@ public: void astrocade_trigger_lightpen(uint8_t vfeedback, uint8_t hfeedback); inline void increment_source(uint8_t curwidth, uint8_t *u13ff); inline void increment_dest(uint8_t curwidth); - void execute_blit(address_space &space); + void execute_blit(); void init_sparklestar(); virtual void machine_start() override; diff --git a/src/mame/video/astrocde.cpp b/src/mame/video/astrocde.cpp index 3bfac35775f..f90564e4077 100644 --- a/src/mame/video/astrocde.cpp +++ b/src/mame/video/astrocde.cpp @@ -749,8 +749,10 @@ inline void astrocde_state::increment_dest(uint8_t curwidth) } -void astrocde_state::execute_blit(address_space &space) +void astrocde_state::execute_blit() { + address_space &space = m_maincpu->space(AS_PROGRAM); + /* m_pattern_source = counter set U7/U16/U25/U34 m_pattern_dest = counter set U9/U18/U30/U39 @@ -841,7 +843,7 @@ void astrocde_state::execute_blit(address_space &space) } while (m_pattern_height-- != 0); /* count cycles we ran the bus */ - space.device().execute().adjust_icount(-cycles); + m_maincpu->adjust_icount(-cycles); } @@ -876,7 +878,7 @@ WRITE8_MEMBER(astrocde_state::astrocade_pattern_board_w) case 6: /* height of blit and initiator */ m_pattern_height = data; - execute_blit(m_maincpu->space(AS_PROGRAM)); + execute_blit(); break; } }