mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
removed some of machine().first_screen() users (nw)
This commit is contained in:
parent
b5a348c7c1
commit
4dfd3473ba
@ -53,7 +53,8 @@ public:
|
||||
m_io_lpenconf(*this, "LPENCONF"),
|
||||
m_io_lpenx(*this, "LPENX"),
|
||||
m_io_lpeny(*this, "LPENY"),
|
||||
m_io_coin(*this, "COIN") { }
|
||||
m_io_coin(*this, "COIN"),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_gce_vectorram;
|
||||
int m_64k_cart;
|
||||
@ -135,6 +136,7 @@ protected:
|
||||
required_ioport m_io_lpenx;
|
||||
required_ioport m_io_lpeny;
|
||||
optional_ioport m_io_coin;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
void vectrex_configuration();
|
||||
void vectrex_multiplexer(int mux);
|
||||
|
@ -233,8 +233,7 @@ TIMER_CALLBACK_MEMBER(vectrex_state::update_signal)
|
||||
|
||||
void vectrex_state::video_start()
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
m_x_center=(visarea.width() / 2) << 16;
|
||||
m_y_center=(visarea.height() / 2) << 16;
|
||||
@ -416,8 +415,7 @@ WRITE8_MEMBER(vectrex_state::raaspec_led_w)
|
||||
|
||||
VIDEO_START_MEMBER(vectrex_state,raaspec)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
m_x_center=(visarea.width() / 2) << 16;
|
||||
m_y_center=(visarea.height() / 2) << 16;
|
||||
|
@ -56,7 +56,8 @@ public:
|
||||
m_joy2(*this, CONTROL2_TAG) ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_modeFE_trigger_on_next_access(false) { }
|
||||
m_modeFE_trigger_on_next_access(false),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
dpc_t m_dpc;
|
||||
memory_region* m_extra_RAM;
|
||||
@ -169,6 +170,7 @@ protected:
|
||||
required_device<m6502_device> m_maincpu;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
bool m_modeFE_trigger_on_next_access;
|
||||
required_device<screen_device> m_screen;
|
||||
};
|
||||
|
||||
|
||||
@ -1453,8 +1455,7 @@ WRITE16_MEMBER(a2600_state::a2600_tia_vsync_callback_pal)
|
||||
|
||||
MACHINE_START_MEMBER(a2600_state,a2600)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
m_current_screen_height = screen->height();
|
||||
m_current_screen_height = m_screen->height();
|
||||
m_extra_RAM = machine().memory().region_alloc("user2", 0x8600, 1, ENDIANNESS_LITTLE);
|
||||
memset( m_riot_ram, 0x00, 0x80 );
|
||||
m_current_reset_bank_counter = 0xFF;
|
||||
|
@ -19,7 +19,8 @@ public:
|
||||
: driver_device(mconfig, type, tag) ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
UINT32 m_panel_data_reg; /* value of a data register on the control panel which can
|
||||
be edited - the existence of this register is a personnal
|
||||
@ -49,6 +50,7 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
};
|
||||
|
||||
void apexc_state::machine_start()
|
||||
@ -569,9 +571,8 @@ PALETTE_INIT_MEMBER(apexc_state, apexc)
|
||||
|
||||
void apexc_state::video_start()
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
int width = screen->width();
|
||||
int height = screen->height();
|
||||
int width = m_screen->width();
|
||||
int height = m_screen->height();
|
||||
|
||||
m_bitmap = auto_bitmap_ind16_alloc(machine(), width, height);
|
||||
m_bitmap->fill(0, /*machine().visible_area*/teletyper_window);
|
||||
|
@ -16,10 +16,13 @@ public:
|
||||
ssem_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_store(*this, "store"){ }
|
||||
m_store(*this, "store"),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
required_device<ssem_device> m_maincpu;
|
||||
required_shared_ptr<UINT8> m_store;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
UINT8 m_store_line;
|
||||
virtual void machine_reset();
|
||||
UINT32 screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
@ -403,8 +406,7 @@ void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, const char
|
||||
va_list arg_list;
|
||||
char buf[32768];
|
||||
INT32 index = 0;
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
va_start( arg_list, msg );
|
||||
vsprintf( buf, msg, arg_list );
|
||||
|
@ -36,7 +36,8 @@ public:
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_gfxdecode(*this, "gfxdecode") { }
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
int m_vh_clrscrn_pressed;
|
||||
int m_kbd_data;
|
||||
@ -84,6 +85,7 @@ public:
|
||||
DECLARE_SNAPSHOT_LOAD_MEMBER( apple1 );
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
};
|
||||
|
||||
|
||||
|
@ -41,7 +41,8 @@ public:
|
||||
m_joysticks(*this, "joysticks") ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
DECLARE_READ8_MEMBER(arcadia_vsync_r);
|
||||
DECLARE_READ8_MEMBER(arcadia_video_r);
|
||||
@ -117,5 +118,6 @@ protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
};
|
||||
#endif /* ARCADIA_H_ */
|
||||
|
@ -49,7 +49,8 @@ public:
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_ay8910(*this, "ay8910"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette")
|
||||
m_palette(*this, "palette"),
|
||||
m_screen(*this, "screen")
|
||||
{
|
||||
}
|
||||
|
||||
@ -94,6 +95,7 @@ public:
|
||||
required_device<ay8910_device> m_ay8910;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
void cgenie_offset_xy();
|
||||
int cgenie_get_register(int indx);
|
||||
|
@ -75,7 +75,8 @@ public:
|
||||
m_io_x11(*this, "X11"),
|
||||
m_io_x12(*this, "X12"),
|
||||
m_io_x13(*this, "X13"),
|
||||
m_io_x14(*this, "X14") { }
|
||||
m_io_x14(*this, "X14"),
|
||||
m_screen(*this, "screen") { }
|
||||
|
||||
DECLARE_WRITE8_MEMBER( mbee_04_w );
|
||||
DECLARE_WRITE8_MEMBER( mbee_06_w );
|
||||
@ -218,6 +219,7 @@ private:
|
||||
optional_ioport m_io_x12;
|
||||
optional_ioport m_io_x13;
|
||||
optional_ioport m_io_x14;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
void machine_reset_common_disk();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
@ -105,7 +105,8 @@ public:
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_mc6846(*this, "mc6846"),
|
||||
m_mc6843(*this, "mc6843"),
|
||||
m_acia6850(*this, "acia6850")
|
||||
m_acia6850(*this, "acia6850"),
|
||||
m_screen(*this, "screen")
|
||||
{
|
||||
}
|
||||
|
||||
@ -321,6 +322,7 @@ protected:
|
||||
optional_device<mc6846_device> m_mc6846;
|
||||
optional_device<mc6843_device> m_mc6843;
|
||||
optional_device<acia6850_device> m_acia6850;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
/* bank logging and optimisations */
|
||||
int m_old_cart_bank;
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_screen(*this, "screen"),
|
||||
m_keypad1_1(*this, "KEYPAD1_1"),
|
||||
m_keypad1_2(*this, "KEYPAD1_2"),
|
||||
m_keypad1_3(*this, "KEYPAD1_3"),
|
||||
@ -119,6 +120,7 @@ public:
|
||||
|
||||
protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<screen_device> m_screen;
|
||||
required_ioport m_keypad1_1;
|
||||
required_ioport m_keypad1_2;
|
||||
required_ioport m_keypad1_3;
|
||||
@ -134,7 +136,7 @@ protected:
|
||||
#else
|
||||
required_ioport m_joys;
|
||||
required_ioport m_config;
|
||||
#endif
|
||||
#endif
|
||||
inline UINT8 vc4000_joystick_return_to_centre(UINT8 joy);
|
||||
void vc4000_draw_digit(bitmap_ind16 &bitmap, int x, int y, int d, int line);
|
||||
inline void vc4000_collision_plot(UINT8 *collision, UINT8 data, UINT8 color, int scale);
|
||||
|
@ -321,7 +321,7 @@ attotime apple1_state::apple1_vh_dsp_time_to_ready ()
|
||||
{
|
||||
int cursor_x, cursor_y;
|
||||
int cursor_scanline;
|
||||
double scanline_period = machine().primary_screen->scan_period().as_double();
|
||||
double scanline_period = m_screen->scan_period().as_double();
|
||||
double cursor_hfrac;
|
||||
|
||||
/* The video hardware refreshes the screen by reading the
|
||||
@ -340,20 +340,20 @@ attotime apple1_state::apple1_vh_dsp_time_to_ready ()
|
||||
for the visible part of the scanline. */
|
||||
cursor_hfrac = (175 + cursor_x * apple1_charlayout.width) / 455;
|
||||
|
||||
if (machine().primary_screen->vpos() == cursor_scanline) {
|
||||
if (m_screen->vpos() == cursor_scanline) {
|
||||
/* video_screen_get_hpos() doesn't account for the horizontal
|
||||
blanking interval; it acts as if the scanline period is
|
||||
entirely composed of visible pixel times. However, we can
|
||||
still use it to find what fraction of the current scanline
|
||||
period has elapsed. */
|
||||
double current_hfrac = machine().primary_screen->hpos() /
|
||||
machine().first_screen()->width();
|
||||
double current_hfrac = m_screen->hpos() /
|
||||
m_screen->width();
|
||||
if (current_hfrac < cursor_hfrac)
|
||||
return attotime::from_double(scanline_period * (cursor_hfrac - current_hfrac));
|
||||
}
|
||||
|
||||
return attotime::from_double(
|
||||
machine().primary_screen->time_until_pos(cursor_scanline, 0).as_double() +
|
||||
m_screen->time_until_pos(cursor_scanline, 0).as_double() +
|
||||
scanline_period * cursor_hfrac);
|
||||
}
|
||||
|
||||
|
@ -302,9 +302,8 @@ void arcadia_state::video_start()
|
||||
}
|
||||
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
int width = screen->width();
|
||||
int height = screen->height();
|
||||
int width = m_screen->width();
|
||||
int height = m_screen->height();
|
||||
m_bitmap = auto_bitmap_ind16_alloc(machine(), width, height);
|
||||
}
|
||||
}
|
||||
@ -614,8 +613,7 @@ void arcadia_state::arcadia_draw_sprites()
|
||||
|
||||
INTERRUPT_GEN_MEMBER(arcadia_state::arcadia_video_line)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
int width = screen->width();
|
||||
int width = m_screen->width();
|
||||
|
||||
if (m_ad_delay<=0)
|
||||
m_ad_select=m_reg.d.pal[1]&0x40;
|
||||
|
@ -20,10 +20,8 @@
|
||||
***************************************************************************/
|
||||
void cgenie_state::video_start()
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
|
||||
screen->register_screen_bitmap(m_dlybitmap);
|
||||
screen->register_screen_bitmap(m_bitmap);
|
||||
m_screen->register_screen_bitmap(m_dlybitmap);
|
||||
m_screen->register_screen_bitmap(m_bitmap);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -214,7 +214,7 @@ cgb_lcd_device::cgb_lcd_device(const machine_config &mconfig, const char *tag, d
|
||||
|
||||
void gb_lcd_device::common_start()
|
||||
{
|
||||
machine().primary_screen->register_screen_bitmap(m_bitmap);
|
||||
m_screen->register_screen_bitmap(m_bitmap);
|
||||
m_oam = auto_alloc_array_clear(machine(), UINT8, 0x100);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(gb_lcd_device::videoptr_restore), this));
|
||||
@ -762,8 +762,7 @@ void gb_lcd_device::update_scanline()
|
||||
{
|
||||
if (m_current_line < 144)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &r = screen->visible_area();
|
||||
const rectangle &r = m_screen->visible_area();
|
||||
rectangle r1(r.min_x, r.max_x, m_current_line, m_current_line);
|
||||
bitmap.fill(0, r1);
|
||||
}
|
||||
@ -1411,8 +1410,7 @@ void cgb_lcd_device::update_scanline()
|
||||
{
|
||||
if (m_current_line < 144)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &r1 = screen->visible_area();
|
||||
const rectangle &r1 = m_screen->visible_area();
|
||||
rectangle r(r1.min_x, r1.max_x, m_current_line, m_current_line);
|
||||
bitmap.fill((!m_gbc_mode) ? 0 : 32767 , r);
|
||||
}
|
||||
|
@ -291,11 +291,10 @@ void mbee_state::mbee_video_kbd_scan( int param )
|
||||
|
||||
READ8_MEMBER( mbee_state::m6545_status_r )
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
UINT8 data = m_sy6545_status; // bit 6 = lpen strobe, bit 7 = update strobe
|
||||
int y = machine().primary_screen->vpos();
|
||||
int y = m_screen->vpos();
|
||||
|
||||
if( y < visarea.min_y || y > visarea.max_y )
|
||||
data |= 0x20; /* vertical blanking */
|
||||
|
@ -29,8 +29,7 @@
|
||||
|
||||
int thomson_state::thom_update_screen_size()
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
UINT8 p = ioport("vconfig")->read();
|
||||
int new_w, new_h, changed = 0;
|
||||
|
||||
@ -53,7 +52,7 @@ int thomson_state::thom_update_screen_size()
|
||||
if ( ( visarea.max_x != new_w ) || ( visarea.max_y != new_h ) )
|
||||
{
|
||||
changed = 1;
|
||||
machine().primary_screen->set_visible_area(0, new_w, 0, new_h );
|
||||
m_screen->set_visible_area(0, new_w, 0, new_h );
|
||||
}
|
||||
|
||||
return changed;
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
void vc4000_state::video_start()
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
int i;
|
||||
|
||||
for (i=0;i<0x20; i++)
|
||||
@ -57,7 +56,7 @@ void vc4000_state::video_start()
|
||||
m_video.sprites[3].data = &m_video.reg.d.sprite4;
|
||||
m_video.sprites[3].mask = 1 << 3;
|
||||
|
||||
m_bitmap = auto_bitmap_ind16_alloc(machine(), screen->width(), screen->height());
|
||||
m_bitmap = auto_bitmap_ind16_alloc(machine(), m_screen->width(), m_screen->height());
|
||||
}
|
||||
|
||||
inline UINT8 vc4000_state::vc4000_joystick_return_to_centre(UINT8 joy)
|
||||
@ -517,9 +516,8 @@ void vc4000_state::vc4000_sprite_update(bitmap_ind16 &bitmap, UINT8 *collision,
|
||||
|
||||
inline void vc4000_state::vc4000_draw_grid(UINT8 *collision)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
int width = screen->width();
|
||||
int height = screen->height();
|
||||
int width = m_screen->width();
|
||||
int height = m_screen->height();
|
||||
int i, j, m, x, line=m_video.line-20;
|
||||
int w, k;
|
||||
|
||||
@ -575,8 +573,8 @@ INTERRUPT_GEN_MEMBER(vc4000_state::vc4000_video_line)
|
||||
{
|
||||
int x,y,i;
|
||||
UINT8 collision[400]={0}; // better alloca or gcc feature of non constant long automatic arrays
|
||||
const rectangle &visarea = machine().primary_screen->visible_area();
|
||||
assert(ARRAY_LENGTH(collision) >= machine().primary_screen->width());
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
assert(ARRAY_LENGTH(collision) >= m_screen->width());
|
||||
|
||||
m_video.line++;
|
||||
if (m_irq_pause) m_irq_pause++;
|
||||
|
@ -48,10 +48,9 @@ void zx_state::device_timer(emu_timer &timer, device_timer_id id, int param, voi
|
||||
*/
|
||||
void zx_state::zx_ula_bkgnd(UINT8 color)
|
||||
{
|
||||
screen_device *screen = machine().first_screen();
|
||||
int width = screen->width();
|
||||
int height = screen->height();
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
int width = m_screen->width();
|
||||
int height = m_screen->height();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
if (m_ula_frame_vsync == 0 && color != m_old_c)
|
||||
{
|
||||
@ -103,9 +102,8 @@ TIMER_CALLBACK_MEMBER(zx_state::zx_ula_nmi)
|
||||
* An NMI is issued on the ZX81 every 64us for the blanked
|
||||
* scanlines at the top and bottom of the display.
|
||||
*/
|
||||
screen_device *screen = machine().first_screen();
|
||||
int height = screen->height();
|
||||
const rectangle& r1 = screen->visible_area();
|
||||
int height = m_screen->height();
|
||||
const rectangle& r1 = m_screen->visible_area();
|
||||
rectangle r;
|
||||
|
||||
bitmap_ind16 &bitmap = m_bitmap;
|
||||
|
Loading…
Reference in New Issue
Block a user