diff --git a/src/mame/includes/galaxy.h b/src/mame/includes/galaxy.h index f09feb588ac..49447043704 100644 --- a/src/mame/includes/galaxy.h +++ b/src/mame/includes/galaxy.h @@ -12,26 +12,19 @@ #include "imagedev/snapquik.h" #include "imagedev/cassette.h" #include "machine/ram.h" - +#include "screen.h" class galaxy_state : public driver_device { public: galaxy_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_region_gfx1(*this, "gfx1") { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_screen(*this, "screen") + , m_cassette(*this, "cassette") + , m_ram(*this, RAM_TAG) + , m_region_gfx1(*this, "gfx1") {} - int m_interrupts_enabled; - uint8_t m_latch_value; - uint32_t m_gal_cnt; - uint8_t m_code; - uint8_t m_first; - uint32_t m_start_addr; - emu_timer *m_gal_video_timer; - bitmap_ind16 m_bitmap; DECLARE_READ8_MEMBER(galaxy_keyboard_r); DECLARE_WRITE8_MEMBER(galaxy_latch_w); DECLARE_DRIVER_INIT(galaxy); @@ -45,18 +38,29 @@ public: IRQ_CALLBACK_MEMBER(galaxy_irq_callback); void galaxy_set_timer(); void galaxy_setup_snapshot (const uint8_t * data, uint32_t size); - required_device m_maincpu; DECLARE_SNAPSHOT_LOAD_MEMBER( galaxy ); void galaxy(machine_config &config); void galaxyp(machine_config &config); void galaxy_mem(address_map &map); void galaxyp_io(address_map &map); void galaxyp_mem(address_map &map); + protected: + required_device m_maincpu; + required_device m_screen; required_device m_cassette; required_device m_ram; required_memory_region m_region_gfx1; ioport_port *m_io_ports[8]; + + int m_interrupts_enabled; + uint8_t m_latch_value; + uint32_t m_gal_cnt; + uint8_t m_code; + uint8_t m_first; + uint32_t m_start_addr; + emu_timer *m_gal_video_timer; + bitmap_ind16 m_bitmap; }; diff --git a/src/mame/video/galaxy.cpp b/src/mame/video/galaxy.cpp index e242e301cd1..3b03991d3bb 100644 --- a/src/mame/video/galaxy.cpp +++ b/src/mame/video/galaxy.cpp @@ -119,7 +119,7 @@ void galaxy_state::video_start() m_gal_video_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(galaxy_state::gal_video),this)); m_gal_video_timer->adjust(attotime::zero, 0, attotime::never); - machine().first_screen()->register_screen_bitmap(m_bitmap); + m_screen->register_screen_bitmap(m_bitmap); } uint32_t galaxy_state::screen_update_galaxy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)