Removed first_screen usage from video/galaxy.cpp, nw

This commit is contained in:
mooglyguy 2018-03-10 06:08:19 +01:00
parent ccba7735df
commit ed84b661e3
2 changed files with 20 additions and 16 deletions

View File

@ -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<cpu_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<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<cassette_image_device> m_cassette;
required_device<ram_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;
};

View File

@ -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)