summaryrefslogtreecommitdiffstats
path: root/src/mess/video
diff options
context:
space:
mode:
authorGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2014-03-15 13:00:23 +0000
committerGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2014-03-15 13:00:23 +0000
commita66aff27d6ca7657fe729f8a922e8773d601a37a (patch)
tree3835abb43e8ca1388434b8d4541a6276e18daf0e /src/mess/video
parent445c89c839044afed3a09478dbd1cdb77f87cf92 (diff)
primary_screen -> first_screen() (nw)
Diffstat (limited to 'src/mess/video')
-rw-r--r--src/mess/video/a7800.c2
-rw-r--r--src/mess/video/atarist.c14
-rw-r--r--src/mess/video/bbc.c8
-rw-r--r--src/mess/video/electron.c4
-rw-r--r--src/mess/video/fm7.c10
-rw-r--r--src/mess/video/fmtowns.c10
-rw-r--r--src/mess/video/galaxy.c2
-rw-r--r--src/mess/video/gamecom.c4
-rw-r--r--src/mess/video/gba.c2
-rw-r--r--src/mess/video/kaypro.c2
-rw-r--r--src/mess/video/kc.c2
-rw-r--r--src/mess/video/mac.c4
-rw-r--r--src/mess/video/pc1512.c4
-rw-r--r--src/mess/video/poisk1.c4
-rw-r--r--src/mess/video/samcoupe.c8
-rw-r--r--src/mess/video/spectrum.c8
-rw-r--r--src/mess/video/stic.c2
-rw-r--r--src/mess/video/wswan.c2
-rw-r--r--src/mess/video/x68k.c44
-rw-r--r--src/mess/video/zx.c8
20 files changed, 72 insertions, 72 deletions
diff --git a/src/mess/video/a7800.c b/src/mess/video/a7800.c
index b2d1fc5ae9b..a74caacd01c 100644
--- a/src/mess/video/a7800.c
+++ b/src/mess/video/a7800.c
@@ -68,7 +68,7 @@ void a7800_state::video_start()
m_maria_kangaroo = 0;
m_maria_rm = 0;
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
}
/***************************************************************************
diff --git a/src/mess/video/atarist.c b/src/mess/video/atarist.c
index e6339d26a0f..2c80d6beb9a 100644
--- a/src/mess/video/atarist.c
+++ b/src/mess/video/atarist.c
@@ -134,8 +134,8 @@ inline pen_t st_state::shift_mode_2()
void st_state::shifter_tick()
{
- int y = machine().primary_screen->vpos();
- int x = machine().primary_screen->hpos();
+ int y = machine().first_screen()->vpos();
+ int x = machine().first_screen()->hpos();
pen_t pen;
@@ -193,8 +193,8 @@ inline void st_state::shifter_load()
void st_state::glue_tick()
{
- int y = machine().primary_screen->vpos();
- int x = machine().primary_screen->hpos();
+ int y = machine().first_screen()->vpos();
+ int x = machine().first_screen()->hpos();
int v = (y >= m_shifter_y_start) && (y < m_shifter_y_end);
int h = (x >= m_shifter_x_start) && (x < m_shifter_x_end);
@@ -1069,10 +1069,10 @@ void st_state::video_start()
m_shifter_timer = timer_alloc(TIMER_SHIFTER_TICK);
m_glue_timer = timer_alloc(TIMER_GLUE_TICK);
-// m_shifter_timer->adjust(machine().primary_screen->time_until_pos(0), 0, attotime::from_hz(Y2/4)); // 125 ns
- m_glue_timer->adjust(machine().primary_screen->time_until_pos(0), 0, attotime::from_hz(Y2/16)); // 500 ns
+// m_shifter_timer->adjust(machine().first_screen()->time_until_pos(0), 0, attotime::from_hz(Y2/4)); // 125 ns
+ m_glue_timer->adjust(machine().first_screen()->time_until_pos(0), 0, attotime::from_hz(Y2/16)); // 500 ns
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
/* register for state saving */
save_item(NAME(m_shifter_base));
diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c
index 3b3d10bb25a..c3df043c574 100644
--- a/src/mess/video/bbc.c
+++ b/src/mess/video/bbc.c
@@ -108,13 +108,13 @@ void bbc_state::set_pixel_lookup()
WRITE8_MEMBER(bbc_state::bbc_videoULA_w)
{
// Make sure vpos is never <0 2008-10-11 PHS.
- int vpos=machine().primary_screen->vpos();
+ int vpos=machine().first_screen()->vpos();
if(vpos==0)
- machine().primary_screen->update_partial(vpos);
+ machine().first_screen()->update_partial(vpos);
else
- machine().primary_screen->update_partial(vpos -1 );
+ machine().first_screen()->update_partial(vpos -1 );
- logerror("setting videoULA %.4x to:%.4x at :%d \n",data,offset,machine().primary_screen->vpos() );
+ logerror("setting videoULA %.4x to:%.4x at :%d \n",data,offset,machine().first_screen()->vpos() );
switch (offset&0x01)
diff --git a/src/mess/video/electron.c b/src/mess/video/electron.c
index 9d23b120274..9e26bfc5fa7 100644
--- a/src/mess/video/electron.c
+++ b/src/mess/video/electron.c
@@ -46,7 +46,7 @@ void electron_state::video_start()
m_map16[i] = ( ( i & 0x40 ) >> 3 ) | ( ( i & 0x10 ) >> 2 ) | ( ( i & 0x04 ) >> 1 ) | ( i & 0x01 );
}
m_scanline_timer = timer_alloc(TIMER_SCANLINE_INTERRUPT);
- m_scanline_timer->adjust( machine().primary_screen->time_until_pos(0), 0, machine().primary_screen->scan_period() );
+ m_scanline_timer->adjust( machine().first_screen()->time_until_pos(0), 0, machine().first_screen()->scan_period() );
}
inline UINT8 electron_state::read_vram( UINT16 addr )
@@ -256,7 +256,7 @@ UINT32 electron_state::screen_update_electron(screen_device &screen, bitmap_ind1
TIMER_CALLBACK_MEMBER(electron_state::electron_scanline_interrupt)
{
- switch (machine().primary_screen->vpos())
+ switch (machine().first_screen()->vpos())
{
case 43:
electron_interrupt_handler( INT_SET, INT_RTC );
diff --git a/src/mess/video/fm7.c b/src/mess/video/fm7.c
index 0eaa5045d50..154541fc4be 100644
--- a/src/mess/video/fm7.c
+++ b/src/mess/video/fm7.c
@@ -1063,7 +1063,7 @@ READ8_MEMBER(fm7_state::fm77av_video_flags_r)
{
UINT8 ret = 0xff;
- if(machine().primary_screen->vblank())
+ if(machine().first_screen()->vblank())
ret &= ~0x80;
if(m_alu.busy != 0)
@@ -1104,7 +1104,7 @@ READ8_MEMBER(fm7_state::fm77av_sub_modestatus_r)
ret |= 0xbc;
ret |= (m_video.modestatus & 0x40);
- if(!machine().primary_screen->vblank())
+ if(!machine().first_screen()->vblank())
ret |= 0x02;
if(m_video.vsync_flag != 0)
@@ -1119,12 +1119,12 @@ WRITE8_MEMBER(fm7_state::fm77av_sub_modestatus_w)
if(data & 0x40)
{
rectangle rect(0, 320-1, 0, 200-1);
- machine().primary_screen->configure(320,200,rect,HZ_TO_ATTOSECONDS(60));
+ machine().first_screen()->configure(320,200,rect,HZ_TO_ATTOSECONDS(60));
}
else
{
rectangle rect(0, 640-1, 0, 200-1);
- machine().primary_screen->configure(640,200,rect,HZ_TO_ATTOSECONDS(60));
+ machine().first_screen()->configure(640,200,rect,HZ_TO_ATTOSECONDS(60));
}
}
@@ -1355,7 +1355,7 @@ TIMER_CALLBACK_MEMBER(fm7_state::fm77av_vsync)
else
{
m_video.vsync_flag = 0;
- m_fm77av_vsync_timer->adjust(machine().primary_screen->time_until_vblank_end());
+ m_fm77av_vsync_timer->adjust(machine().first_screen()->time_until_vblank_end());
}
}
diff --git a/src/mess/video/fmtowns.c b/src/mess/video/fmtowns.c
index 500fe1802e9..a807773489b 100644
--- a/src/mess/video/fmtowns.c
+++ b/src/mess/video/fmtowns.c
@@ -122,7 +122,7 @@ void towns_state::towns_crtc_refresh_mode()
if(scr.max_x <= scr.min_x || scr.max_y <= scr.min_y)
return;
- machine().primary_screen->configure(scr.max_x+1,scr.max_y+1,scr,HZ_TO_ATTOSECONDS(60));
+ machine().first_screen()->configure(scr.max_x+1,scr.max_y+1,scr,HZ_TO_ATTOSECONDS(60));
}
READ8_MEMBER( towns_state::towns_gfx_high_r )
@@ -365,8 +365,8 @@ READ8_MEMBER(towns_state::towns_video_440_r)
if(m_video.towns_crtc_sel == 30)
{
// check video position
- xpos = space.machine().primary_screen->hpos();
- ypos = space.machine().primary_screen->vpos();
+ xpos = space.machine().first_screen()->hpos();
+ ypos = space.machine().first_screen()->vpos();
if(xpos < (m_video.towns_crtc_reg[0] & 0xfe))
ret |= 0x02;
@@ -521,7 +521,7 @@ READ8_MEMBER(towns_state::towns_video_fd90_r)
return m_video.towns_degipal[offset-0x08];
case 0x10: // "sub status register"
// check video position
- xpos = space.machine().primary_screen->hpos();
+ xpos = space.machine().first_screen()->hpos();
if(xpos < m_video.towns_crtc_layerscr[0].max_x && xpos > m_video.towns_crtc_layerscr[0].min_x)
ret |= 0x02;
@@ -1655,7 +1655,7 @@ INTERRUPT_GEN_MEMBER(towns_state::towns_vsync_irq)
dev->ir3_w(1); // IRQ11 = VSync
if(IRQ_LOG) logerror("PIC: IRQ11 (VSync) set high\n");
m_video.towns_vblank_flag = 1;
- machine().scheduler().timer_set(machine().primary_screen->time_until_vblank_end(), timer_expired_delegate(FUNC(towns_state::towns_vblank_end),this), 0, (void*)dev);
+ machine().scheduler().timer_set(machine().first_screen()->time_until_vblank_end(), timer_expired_delegate(FUNC(towns_state::towns_vblank_end),this), 0, (void*)dev);
if(m_video.towns_tvram_enable)
draw_text_layer();
if(m_video.towns_sprite_reg[1] & 0x80)
diff --git a/src/mess/video/galaxy.c b/src/mess/video/galaxy.c
index e16baab5fd1..35dfec58d01 100644
--- a/src/mess/video/galaxy.c
+++ b/src/mess/video/galaxy.c
@@ -115,7 +115,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().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
}
UINT32 galaxy_state::screen_update_galaxy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mess/video/gamecom.c b/src/mess/video/gamecom.c
index 1d605e8055c..61b1ac22e3d 100644
--- a/src/mess/video/gamecom.c
+++ b/src/mess/video/gamecom.c
@@ -65,6 +65,6 @@ TIMER_CALLBACK_MEMBER(gamecom_state::gamecom_scanline)
void gamecom_state::video_start()
{
m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamecom_state::gamecom_scanline),this));
- m_scanline_timer->adjust( machine().primary_screen->time_until_pos(0 ), 0, machine().primary_screen->scan_period() );
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ m_scanline_timer->adjust( machine().first_screen()->time_until_pos(0 ), 0, machine().first_screen()->scan_period() );
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
}
diff --git a/src/mess/video/gba.c b/src/mess/video/gba.c
index 3c79b773fc5..df584dfea13 100644
--- a/src/mess/video/gba.c
+++ b/src/mess/video/gba.c
@@ -1890,7 +1890,7 @@ void gba_state::draw_scanline(int y)
void gba_state::video_start()
{
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
}
UINT32 gba_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mess/video/kaypro.c b/src/mess/video/kaypro.c
index 2078829a693..6e97b80853f 100644
--- a/src/mess/video/kaypro.c
+++ b/src/mess/video/kaypro.c
@@ -250,7 +250,7 @@ void kaypro_state::mc6845_screen_configure()
/* Resize the screen */
if ((width < 640) && (height < 400) && (bytes < 0x800)) /* bounds checking to prevent an assert or violation */
- machine().primary_screen->set_visible_area(0, width, 0, height);
+ machine().first_screen()->set_visible_area(0, width, 0, height);
}
diff --git a/src/mess/video/kc.c b/src/mess/video/kc.c
index d847e648873..dc87b4599e4 100644
--- a/src/mess/video/kc.c
+++ b/src/mess/video/kc.c
@@ -58,7 +58,7 @@ WRITE_LINE_MEMBER( kc_state::video_toggle_blink_state )
{
if (state)
{
- machine().primary_screen->update_partial(machine().primary_screen->vpos());
+ machine().first_screen()->update_partial(machine().first_screen()->vpos());
m_kc85_blink_state = !m_kc85_blink_state;
}
diff --git a/src/mess/video/mac.c b/src/mess/video/mac.c
index 3ac1e80e00f..abeda9cd450 100644
--- a/src/mess/video/mac.c
+++ b/src/mess/video/mac.c
@@ -280,7 +280,7 @@ VIDEO_RESET_MEMBER(mac_state,macrbv)
}
// printf("RBV reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
- machine().primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
+ machine().first_screen()->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
render_target *target = machine().render().first_target();
target->set_view(view);
}
@@ -337,7 +337,7 @@ VIDEO_RESET_MEMBER(mac_state,macsonora)
}
// printf("Sonora reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
- machine().primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
+ machine().first_screen()->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
render_target *target = machine().render().first_target();
target->set_view(view);
}
diff --git a/src/mess/video/pc1512.c b/src/mess/video/pc1512.c
index 40fd02b6f81..fd015f03d21 100644
--- a/src/mess/video/pc1512.c
+++ b/src/mess/video/pc1512.c
@@ -169,8 +169,8 @@ READ8_MEMBER( pc1512_state::vdu_r )
// vertical sync
int flyback = 0;
- if (machine().primary_screen->vpos() < VFP_LORES - 16) flyback = 1;
- if (machine().primary_screen->vpos() > VFP_LORES + 200) flyback = 1;
+ if (machine().first_screen()->vpos() < VFP_LORES - 16) flyback = 1;
+ if (machine().first_screen()->vpos() > VFP_LORES + 200) flyback = 1;
data |= flyback << 3;
break;
diff --git a/src/mess/video/poisk1.c b/src/mess/video/poisk1.c
index db32d66103a..6f367c6eb2a 100644
--- a/src/mess/video/poisk1.c
+++ b/src/mess/video/poisk1.c
@@ -116,9 +116,9 @@ WRITE8_MEMBER(p1_state::p1_ppi2_porta_w)
// HIRES -- XXX
if (BIT(data, 7) != BIT(m_video.color_select_68, 7)) {
if (BIT(data, 7))
- machine().primary_screen->set_visible_area(0, 640-1, 0, 200-1);
+ machine().first_screen()->set_visible_area(0, 640-1, 0, 200-1);
else
- machine().primary_screen->set_visible_area(0, 320-1, 0, 200-1);
+ machine().first_screen()->set_visible_area(0, 320-1, 0, 200-1);
}
m_video.color_select_68 = data;
set_palette_luts();
diff --git a/src/mess/video/samcoupe.c b/src/mess/video/samcoupe.c
index 2376a676880..95961b4f7b9 100644
--- a/src/mess/video/samcoupe.c
+++ b/src/mess/video/samcoupe.c
@@ -29,7 +29,7 @@
void samcoupe_state::video_start()
{
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
}
UINT32 samcoupe_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -124,8 +124,8 @@ void samcoupe_state::draw_mode1_line(int y, int hpos)
TIMER_CALLBACK_MEMBER(samcoupe_state::sam_video_update_callback)
{
- int vpos = machine().primary_screen->vpos();
- int hpos = machine().primary_screen->hpos();
+ int vpos = machine().first_screen()->vpos();
+ int hpos = machine().first_screen()->hpos();
int next_vpos = vpos;
int next_hpos = hpos + SAM_BLOCK*2;
@@ -168,5 +168,5 @@ TIMER_CALLBACK_MEMBER(samcoupe_state::sam_video_update_callback)
samcoupe_irq(SAM_LINE_INT);
/* schedule next update */
- m_video_update_timer->adjust(machine().primary_screen->time_until_pos(next_vpos, next_hpos));
+ m_video_update_timer->adjust(machine().first_screen()->time_until_pos(next_vpos, next_hpos));
}
diff --git a/src/mess/video/spectrum.c b/src/mess/video/spectrum.c
index ab0fc789755..886974452c1 100644
--- a/src/mess/video/spectrum.c
+++ b/src/mess/video/spectrum.c
@@ -26,7 +26,7 @@ VIDEO_START_MEMBER(spectrum_state,spectrum)
m_flash_invert = 0;
m_previous_border_x = 0; m_previous_border_y = 0;
- machine().primary_screen->register_screen_bitmap(m_border_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_border_bitmap);
m_screen_location = m_video_ram;
}
@@ -38,7 +38,7 @@ VIDEO_START_MEMBER(spectrum_state,spectrum_128)
m_flash_invert = 0;
m_previous_border_x = 0; m_previous_border_y = 0;
- machine().primary_screen->register_screen_bitmap(m_border_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_border_bitmap);
}
@@ -183,8 +183,8 @@ PALETTE_INIT_MEMBER(spectrum_state,spectrum)
void spectrum_state::spectrum_UpdateBorderBitmap()
{
- unsigned int x = machine().primary_screen->hpos();
- unsigned int y = machine().primary_screen->vpos();
+ unsigned int x = machine().first_screen()->hpos();
+ unsigned int y = machine().first_screen()->vpos();
int width = m_border_bitmap.width();
int height = m_border_bitmap.height();
diff --git a/src/mess/video/stic.c b/src/mess/video/stic.c
index d908eac5fd4..5cf9488d2af 100644
--- a/src/mess/video/stic.c
+++ b/src/mess/video/stic.c
@@ -41,7 +41,7 @@ stic_device::~stic_device()
void stic_device::device_start()
{
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
save_item(NAME(m_stic_registers));
save_item(NAME(m_gramdirty));
diff --git a/src/mess/video/wswan.c b/src/mess/video/wswan.c
index 0625b964bf3..da649d76779 100644
--- a/src/mess/video/wswan.c
+++ b/src/mess/video/wswan.c
@@ -572,7 +572,7 @@ void wswan_state::wswan_refresh_scanline()
void wswan_state::video_start()
{
- machine().primary_screen->register_screen_bitmap(m_bitmap);
+ machine().first_screen()->register_screen_bitmap(m_bitmap);
save_item(NAME(m_bitmap));
}
diff --git a/src/mess/video/x68k.c b/src/mess/video/x68k.c
index 2ccd1243f84..8ff6ae7240f 100644
--- a/src/mess/video/x68k.c
+++ b/src/mess/video/x68k.c
@@ -166,8 +166,8 @@ void x68k_state::x68k_crtc_refresh_mode()
// logerror("CRTC regs - %i %i %i %i - %i %i %i %i - %i - %i\n",m_crtc.reg[0],m_crtc.reg[1],m_crtc.reg[2],m_crtc.reg[3],
// m_crtc.reg[4],m_crtc.reg[5],m_crtc.reg[6],m_crtc.reg[7],m_crtc.reg[8],m_crtc.reg[9]);
- logerror("video_screen_configure(machine.primary_screen,%i,%i,[%i,%i,%i,%i],55.45)\n",scr.max_x,scr.max_y,visiblescr.min_x,visiblescr.min_y,visiblescr.max_x,visiblescr.max_y);
- machine().primary_screen->configure(scr.max_x,scr.max_y,visiblescr,HZ_TO_ATTOSECONDS(55.45));
+ logerror("video_screen_configure(machine.first_screen(),%i,%i,[%i,%i,%i,%i],55.45)\n",scr.max_x,scr.max_y,visiblescr.min_x,visiblescr.min_y,visiblescr.max_x,visiblescr.max_y);
+ machine().first_screen()->configure(scr.max_x,scr.max_y,visiblescr,HZ_TO_ATTOSECONDS(55.45));
}
TIMER_CALLBACK_MEMBER(x68k_state::x68k_hsync)
@@ -183,31 +183,31 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_hsync)
{
if(m_oddscanline == 1)
{
- int scan = machine().primary_screen->vpos();
+ int scan = machine().first_screen()->vpos();
if(scan > m_crtc.vend)
scan = m_crtc.vbegin;
- hsync_time = machine().primary_screen->time_until_pos(scan,(m_crtc.htotal + m_crtc.hend) / 2);
+ hsync_time = machine().first_screen()->time_until_pos(scan,(m_crtc.htotal + m_crtc.hend) / 2);
m_scanline_timer->adjust(hsync_time);
if(scan != 0)
{
if((ioport("options")->read() & 0x04))
{
- machine().primary_screen->update_partial(scan);
+ machine().first_screen()->update_partial(scan);
}
}
}
else
{
- int scan = machine().primary_screen->vpos();
+ int scan = machine().first_screen()->vpos();
if(scan > m_crtc.vend)
scan = m_crtc.vbegin;
- hsync_time = machine().primary_screen->time_until_pos(scan,m_crtc.hend / 2);
+ hsync_time = machine().first_screen()->time_until_pos(scan,m_crtc.hend / 2);
m_scanline_timer->adjust(hsync_time);
if(scan != 0)
{
if((ioport("options")->read() & 0x04))
{
- machine().primary_screen->update_partial(scan);
+ machine().first_screen()->update_partial(scan);
}
}
}
@@ -216,18 +216,18 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_hsync)
{
if(m_oddscanline == 1)
{
- int scan = machine().primary_screen->vpos();
+ int scan = machine().first_screen()->vpos();
if(scan > m_crtc.vend)
scan = m_crtc.vbegin;
else
scan++;
- hsync_time = machine().primary_screen->time_until_pos(scan,m_crtc.hbegin / 2);
+ hsync_time = machine().first_screen()->time_until_pos(scan,m_crtc.hbegin / 2);
m_scanline_timer->adjust(hsync_time, 1);
m_oddscanline = 0;
}
else
{
- hsync_time = machine().primary_screen->time_until_pos(machine().primary_screen->vpos(),(m_crtc.htotal + m_crtc.hbegin) / 2);
+ hsync_time = machine().first_screen()->time_until_pos(machine().first_screen()->vpos(),(m_crtc.htotal + m_crtc.hbegin) / 2);
m_scanline_timer->adjust(hsync_time, 1);
m_oddscanline = 1;
}
@@ -237,22 +237,22 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_hsync)
{
if(hstate == 1)
{
- int scan = machine().primary_screen->vpos();
+ int scan = machine().first_screen()->vpos();
if(scan > m_crtc.vend)
scan = 0;
- hsync_time = machine().primary_screen->time_until_pos(scan,m_crtc.hend);
+ hsync_time = machine().first_screen()->time_until_pos(scan,m_crtc.hend);
m_scanline_timer->adjust(hsync_time);
if(scan != 0)
{
if((ioport("options")->read() & 0x04))
{
- machine().primary_screen->update_partial(scan);
+ machine().first_screen()->update_partial(scan);
}
}
}
if(hstate == 0)
{
- hsync_time = machine().primary_screen->time_until_pos(machine().primary_screen->vpos()+1,m_crtc.hbegin);
+ hsync_time = machine().first_screen()->time_until_pos(machine().first_screen()->vpos()+1,m_crtc.hbegin);
m_scanline_timer->adjust(hsync_time, 1);
}
}
@@ -272,13 +272,13 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_crtc_raster_irq)
if(scan <= m_crtc.vtotal)
{
m_mfpdev->i6_w(0);
- machine().primary_screen->update_partial(scan);
- irq_time = machine().primary_screen->time_until_pos(scan,m_crtc.hbegin);
+ machine().first_screen()->update_partial(scan);
+ irq_time = machine().first_screen()->time_until_pos(scan,m_crtc.hbegin);
// end of HBlank period clears GPIP6 also?
- end_time = machine().primary_screen->time_until_pos(scan,m_crtc.hend);
+ end_time = machine().first_screen()->time_until_pos(scan,m_crtc.hend);
m_raster_irq->adjust(irq_time, scan);
timer_set(end_time, TIMER_X68K_CRTC_RASTER_END);
- logerror("GPIP6: Raster triggered at line %i (%i)\n",scan,machine().primary_screen->vpos());
+ logerror("GPIP6: Raster triggered at line %i (%i)\n",scan,machine().first_screen()->vpos());
}
}
@@ -292,7 +292,7 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_crtc_vblank_irq)
{
m_crtc.vblank = 1;
vblank_line = m_crtc.vbegin;
- irq_time = machine().primary_screen->time_until_pos(vblank_line,2);
+ irq_time = machine().first_screen()->time_until_pos(vblank_line,2);
m_vblank_irq->adjust(irq_time);
logerror("CRTC: VBlank on\n");
}
@@ -302,7 +302,7 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_crtc_vblank_irq)
vblank_line = m_crtc.vend;
if(vblank_line > m_crtc.vtotal)
vblank_line = m_crtc.vtotal;
- irq_time = machine().primary_screen->time_until_pos(vblank_line,2);
+ irq_time = machine().first_screen()->time_until_pos(vblank_line,2);
m_vblank_irq->adjust(irq_time, 1);
logerror("CRTC: VBlank off\n");
}
@@ -379,7 +379,7 @@ WRITE16_MEMBER(x68k_state::x68k_crtc_w )
case 9: // CRTC raster IRQ (GPIP6)
{
attotime irq_time;
- irq_time = machine().primary_screen->time_until_pos((data) / m_crtc.vmultiple,2);
+ irq_time = machine().first_screen()->time_until_pos((data) / m_crtc.vmultiple,2);
if(irq_time.as_double() > 0)
m_raster_irq->adjust(irq_time, (data) / m_crtc.vmultiple);
diff --git a/src/mess/video/zx.c b/src/mess/video/zx.c
index 12161fb615f..edf8e4f3786 100644
--- a/src/mess/video/zx.c
+++ b/src/mess/video/zx.c
@@ -58,8 +58,8 @@ void zx_state::zx_ula_bkgnd(UINT8 color)
rectangle r;
bitmap_ind16 &bitmap = m_bitmap;
- new_y = machine().primary_screen->vpos();
- new_x = machine().primary_screen->hpos();
+ new_y = machine().first_screen()->vpos();
+ new_x = machine().first_screen()->hpos();
/* logerror("zx_ula_bkgnd: %3d,%3d - %3d,%3d\n", state->m_old_x, state->m_old_y, new_x, new_y);*/
y = m_old_y;
for (;;)
@@ -109,7 +109,7 @@ TIMER_CALLBACK_MEMBER(zx_state::zx_ula_nmi)
bitmap_ind16 &bitmap = m_bitmap;
r.set(r1.min_x, r1.max_x, m_ula_scanline_count, m_ula_scanline_count);
bitmap.fill(1, r);
-// logerror("ULA %3d[%d] NMI, R:$%02X, $%04x\n", machine().primary_screen->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC));
+// logerror("ULA %3d[%d] NMI, R:$%02X, $%04x\n", machine().first_screen()->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC));
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
if (++m_ula_scanline_count == height)
m_ula_scanline_count = 0;
@@ -124,7 +124,7 @@ TIMER_CALLBACK_MEMBER(zx_state::zx_ula_irq)
*/
if (m_ula_irq_active)
{
-// logerror("ULA %3d[%d] IRQ, R:$%02X, $%04x\n", machine().primary_screen->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC));
+// logerror("ULA %3d[%d] IRQ, R:$%02X, $%04x\n", machine().first_screen()->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC));
m_ula_irq_active = 0;
m_maincpu->set_input_line(0, HOLD_LINE);