Bulk removal of machine().primary_screen references from MAME drivers, in

favor of using the common m_screen. This is 98% reliable except for cases
where there were multiple screens or where the screens were not named
'screen' like everywhere else. Those cases will need to be revisited but
should reveal themselves in the next round of regression tests.

Eventual plan is primary_screen will go away. Devices that need to know the
screen should have a device_video_interface. Drivers should find the screen
device like any other, or use the pre-found m_screen for the common
single-screen case.
This commit is contained in:
Aaron Giles 2013-08-05 06:00:20 +00:00
parent 46adb9df43
commit 539367c7d1
416 changed files with 1194 additions and 1176 deletions

View File

@ -147,11 +147,11 @@ WRITE16_MEMBER(_3x3puzzle_state::gfx_ctrl_w)
if ( BIT(data,4) )
{
machine().primary_screen->set_visible_area(0*8, 64*8-1, 0*8, 30*8-1);
m_screen->set_visible_area(0*8, 64*8-1, 0*8, 30*8-1);
}
else
{
machine().primary_screen->set_visible_area(0*8, 40*8-1, 0*8, 30*8-1);
m_screen->set_visible_area(0*8, 40*8-1, 0*8, 30*8-1);
}
if ( (data&0x06) != m_oki_bank )

View File

@ -1466,7 +1466,7 @@ MACHINE_CONFIG_END
CUSTOM_INPUT_MEMBER(_8080bw_state::sflush_80_r)
{
return (machine().primary_screen->vpos() & 0x80) ? 1 : 0;
return (m_screen->vpos() & 0x80) ? 1 : 0;
}
static ADDRESS_MAP_START( sflush_map, AS_PROGRAM, 8, _8080bw_state )

View File

@ -71,14 +71,14 @@ void acefruit_state::acefruit_update_irq(int vpos)
TIMER_CALLBACK_MEMBER(acefruit_state::acefruit_refresh)
{
int vpos = machine().primary_screen->vpos();
int vpos = m_screen->vpos();
machine().primary_screen->update_partial(vpos );
m_screen->update_partial(vpos );
acefruit_update_irq(vpos);
vpos = ( ( vpos / 8 ) + 1 ) * 8;
m_refresh_timer->adjust( machine().primary_screen->time_until_pos(vpos) );
m_refresh_timer->adjust( m_screen->time_until_pos(vpos) );
}
void acefruit_state::video_start()

View File

@ -405,15 +405,15 @@ READ8_MEMBER(adp_state::t2_r)
UINT8 res;
int h,w;
res = 0;
h = machine().primary_screen->height();
w = machine().primary_screen->width();
h = m_screen->height();
w = m_screen->width();
// popmessage("%d %d",h,w);
if (machine().primary_screen->hpos() > h)
if (m_screen->hpos() > h)
res|= 0x20; //hblank
if (machine().primary_screen->vpos() > w)
if (m_screen->vpos() > w)
res|= 0x40; //vblank
return res;

View File

@ -206,7 +206,7 @@ CUSTOM_INPUT_MEMBER(alg_state::lightgun_pos_r)
int x = 0, y = 0;
/* get the position based on the input select */
get_lightgun_pos(*machine().primary_screen, m_input_select, &x, &y);
get_lightgun_pos(*m_screen, m_input_select, &x, &y);
return (y << 8) | (x >> 2);
}

View File

@ -106,7 +106,7 @@ void arcadecl_state::scanline_update(screen_device &screen, int scanline)
MACHINE_RESET_MEMBER(arcadecl_state,arcadecl)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 32);
scanline_timer_reset(*m_screen, 32);
}

View File

@ -200,7 +200,7 @@ READ32_MEMBER(aristmk5_state::mk5_ioc_r)
{
int vert_pos;
vert_pos = machine().primary_screen->vpos();
vert_pos = m_screen->vpos();
m_flyback = (vert_pos <= m_vidc_regs[VIDC_VDSR] || vert_pos >= m_vidc_regs[VIDC_VDER]) ? 0x80 : 0x00;
//i2c_data = (i2cmem_sda_read(machine().device("i2cmem")) & 1);

View File

@ -267,7 +267,7 @@ TIMER_CALLBACK_MEMBER(astinvad_state::kamizake_int_gen)
/* interrupts are asserted on every state change of the 128V line */
m_maincpu->set_input_line(0, ASSERT_LINE);
param ^= 128;
m_int_timer->adjust(machine().primary_screen->time_until_pos(param), param);
m_int_timer->adjust(m_screen->time_until_pos(param), param);
/* an RC circuit turns the interrupt off after a short amount of time */
timer_set(attotime::from_double(300 * 0.1e-6), TIMER_INT_OFF);
@ -277,7 +277,7 @@ TIMER_CALLBACK_MEMBER(astinvad_state::kamizake_int_gen)
MACHINE_START_MEMBER(astinvad_state,kamikaze)
{
m_int_timer = timer_alloc(TIMER_INT_GEN);
m_int_timer->adjust(machine().primary_screen->time_until_pos(128), 128);
m_int_timer->adjust(m_screen->time_until_pos(128), 128);
save_item(NAME(m_screen_flip));
save_item(NAME(m_screen_red));

View File

@ -83,7 +83,7 @@ public:
VIDEO_START_MEMBER(astrocorp_state,astrocorp)
{
machine().primary_screen->register_screen_bitmap(m_bitmap);
m_screen->register_screen_bitmap(m_bitmap);
save_item(NAME(m_bitmap));
save_item (NAME(m_screen_enable));
@ -180,7 +180,7 @@ WRITE16_MEMBER(astrocorp_state::astrocorp_draw_sprites_w)
UINT16 now = COMBINE_DATA(&m_draw_sprites);
if (!old && now)
draw_sprites(m_bitmap, machine().primary_screen->visible_area());
draw_sprites(m_bitmap, m_screen->visible_area());
}
WRITE16_MEMBER(astrocorp_state::astrocorp_eeprom_w)

View File

@ -292,7 +292,7 @@ WRITE8_MEMBER(astrof_state::video_control_1_w)
/* D2 - not connected in the schematics, but at one point Astro Fighter sets it to 1 */
/* D3-D7 - not connected */
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
}
@ -313,7 +313,7 @@ void astrof_state::astrof_set_video_control_2( UINT8 data )
WRITE8_MEMBER(astrof_state::astrof_video_control_2_w)
{
astrof_set_video_control_2(data);
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
}
@ -331,7 +331,7 @@ void astrof_state::spfghmk2_set_video_control_2( UINT8 data )
WRITE8_MEMBER(astrof_state::spfghmk2_video_control_2_w)
{
spfghmk2_set_video_control_2(data);
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
}
@ -348,7 +348,7 @@ void astrof_state::tomahawk_set_video_control_2( UINT8 data )
WRITE8_MEMBER(astrof_state::tomahawk_video_control_2_w)
{
tomahawk_set_video_control_2(data);
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
}

View File

@ -47,7 +47,7 @@ MACHINE_START_MEMBER(atarig1_state,atarig1)
MACHINE_RESET_MEMBER(atarig1_state,atarig1)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -51,7 +51,7 @@ MACHINE_START_MEMBER(atarig42_state,atarig42)
MACHINE_RESET_MEMBER(atarig42_state,atarig42)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -90,7 +90,7 @@ void atarigt_state::update_interrupts()
MACHINE_RESET_MEMBER(atarigt_state,atarigt)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -42,7 +42,7 @@ void atarigx2_state::update_interrupts()
MACHINE_RESET_MEMBER(atarigx2_state,atarigx2)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -221,7 +221,7 @@ MACHINE_RESET_MEMBER(atarisy2_state,atarisy2)
{
atarigen_state::machine_reset();
slapstic_reset();
scanline_timer_reset(*machine().primary_screen, 64);
scanline_timer_reset(*m_screen, 64);
m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(atarisy2_state::atarisy2_direct_handler), this));

View File

@ -77,7 +77,7 @@ TIMER_CALLBACK_MEMBER(atetris_state::interrupt_gen)
scanline += 32;
if (scanline >= 256)
scanline -= 256;
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(scanline), scanline);
m_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
@ -120,7 +120,7 @@ void atetris_state::machine_reset()
reset_bank();
/* start interrupts going (32V clocked by 16V) */
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(48), 48);
m_interrupt_timer->adjust(m_screen->time_until_pos(48), 48);
}

View File

@ -213,7 +213,7 @@ MACHINE_RESET_MEMBER(badlands_state,badlands)
m_pedal_value[0] = m_pedal_value[1] = 0x80;
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 32);
scanline_timer_reset(*m_screen, 32);
memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
}
@ -687,7 +687,7 @@ MACHINE_RESET_MEMBER(badlands_state,badlandsb)
// m_pedal_value[0] = m_pedal_value[1] = 0x80;
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 32);
scanline_timer_reset(*m_screen, 32);
// memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
}

View File

@ -73,7 +73,7 @@ WRITE16_MEMBER(batman_state::latch_w)
/* alpha bank is selected by the upper 4 bits */
if ((oldword ^ m_latch_data) & 0x7000)
{
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
m_vad->alpha()->mark_all_dirty();
m_alpha_tile_bank = (m_latch_data >> 12) & 7;
}

View File

@ -113,7 +113,7 @@ TIMER_CALLBACK_MEMBER(beaminv_state::interrupt_callback)
next_interrupt_number = (interrupt_number + 1) % INTERRUPTS_PER_FRAME;
next_vpos = interrupt_lines[next_interrupt_number];
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(next_vpos), next_interrupt_number);
m_interrupt_timer->adjust(m_screen->time_until_pos(next_vpos), next_interrupt_number);
}
@ -126,7 +126,7 @@ void beaminv_state::create_interrupt_timer()
void beaminv_state::start_interrupt_timer()
{
int vpos = interrupt_lines[0];
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(vpos));
m_interrupt_timer->adjust(m_screen->time_until_pos(vpos));
}
@ -197,7 +197,7 @@ UINT32 beaminv_state::screen_update_beaminv(screen_device &screen, bitmap_rgb32
READ8_MEMBER(beaminv_state::v128_r)
{
return (machine().primary_screen->vpos() >> 7) & 0x01;
return (m_screen->vpos() >> 7) & 0x01;
}

View File

@ -149,7 +149,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback)
int scanline = param;
/* update the video */
machine().primary_screen->update_now();
m_screen->update_now();
/* on scanline zero, clear any halt condition */
if (scanline == 0)
@ -165,7 +165,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback)
update_interrupts();
/* set the timer for the next one */
timer.adjust(machine().primary_screen->time_until_pos(scanline) - m_hblank_offset, scanline);
timer.adjust(m_screen->time_until_pos(scanline) - m_hblank_offset, scanline);
}
@ -179,9 +179,9 @@ void beathead_state::machine_reset()
memcpy(m_ram_base, m_rom_base, 0x40);
/* compute the timing of the HBLANK interrupt and set the first timer */
m_hblank_offset = machine().primary_screen->scan_period() * (455 - 336 - 25) / 455;
m_hblank_offset = m_screen->scan_period() * (455 - 336 - 25) / 455;
timer_device *scanline_timer = machine().device<timer_device>("scan_timer");
scanline_timer->adjust(machine().primary_screen->time_until_pos(0) - m_hblank_offset);
scanline_timer->adjust(m_screen->time_until_pos(0) - m_hblank_offset);
/* reset IRQs */
m_irq_line_state = CLEAR_LINE;

View File

@ -217,7 +217,7 @@ TIMER_CALLBACK_MEMBER(berzerk_state::irq_callback)
next_v256 = irq_trigger_v256s[next_irq_number];
next_vpos = vsync_chain_counter_to_vpos(next_counter, next_v256);
m_irq_timer->adjust(machine().primary_screen->time_until_pos(next_vpos), next_irq_number);
m_irq_timer->adjust(m_screen->time_until_pos(next_vpos), next_irq_number);
}
@ -230,7 +230,7 @@ void berzerk_state::create_irq_timer()
void berzerk_state::start_irq_timer()
{
int vpos = vsync_chain_counter_to_vpos(irq_trigger_counts[0], irq_trigger_v256s[0]);
m_irq_timer->adjust(machine().primary_screen->time_until_pos(vpos));
m_irq_timer->adjust(m_screen->time_until_pos(vpos));
}
@ -294,7 +294,7 @@ TIMER_CALLBACK_MEMBER(berzerk_state::nmi_callback)
next_v256 = nmi_trigger_v256s[next_nmi_number];
next_vpos = vsync_chain_counter_to_vpos(next_counter, next_v256);
m_nmi_timer->adjust(machine().primary_screen->time_until_pos(next_vpos), next_nmi_number);
m_nmi_timer->adjust(m_screen->time_until_pos(next_vpos), next_nmi_number);
}
@ -307,7 +307,7 @@ void berzerk_state::create_nmi_timer()
void berzerk_state::start_nmi_timer()
{
int vpos = vsync_chain_counter_to_vpos(nmi_trigger_counts[0], nmi_trigger_v256s[0]);
m_nmi_timer->adjust(machine().primary_screen->time_until_pos(vpos));
m_nmi_timer->adjust(m_screen->time_until_pos(vpos));
}
@ -427,7 +427,7 @@ READ8_MEMBER(berzerk_state::intercept_v256_r)
UINT8 counter;
UINT8 v256;
vpos_to_vsync_chain_counter(machine().primary_screen->vpos(), &counter, &v256);
vpos_to_vsync_chain_counter(m_screen->vpos(), &counter, &v256);
return (!m_intercept << 7) | v256;
}

View File

@ -40,14 +40,14 @@ void blstroid_state::update_interrupts()
WRITE16_MEMBER(blstroid_state::blstroid_halt_until_hblank_0_w)
{
halt_until_hblank_0(space.device(), *machine().primary_screen);
halt_until_hblank_0(space.device(), *m_screen);
}
MACHINE_RESET_MEMBER(blstroid_state,blstroid)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -120,7 +120,7 @@ TIMER_CALLBACK_MEMBER(boxer_state::periodic_callback)
for (i = 1; i < 256; i++)
if (mask[i] != 0)
timer_set(machine().primary_screen->time_until_pos(i), TIMER_POT_INTERRUPT, mask[i]);
timer_set(m_screen->time_until_pos(i), TIMER_POT_INTERRUPT, mask[i]);
m_pot_state = 0;
}
@ -130,7 +130,7 @@ TIMER_CALLBACK_MEMBER(boxer_state::periodic_callback)
if (scanline >= 262)
scanline = 0;
timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_PERIODIC, scanline);
timer_set(m_screen->time_until_pos(scanline), TIMER_PERIODIC, scanline);
}
@ -233,7 +233,7 @@ READ8_MEMBER(boxer_state::boxer_input_r)
{
UINT8 val = ioport("IN0")->read();
if (ioport("IN3")->read() < machine().primary_screen->vpos())
if (ioport("IN3")->read() < m_screen->vpos())
val |= 0x02;
return (val << ((offset & 7) ^ 7)) & 0x80;
@ -251,7 +251,7 @@ READ8_MEMBER(boxer_state::boxer_misc_r)
break;
case 1:
val = machine().primary_screen->vpos();
val = m_screen->vpos();
break;
case 2:
@ -458,7 +458,7 @@ void boxer_state::machine_start()
void boxer_state::machine_reset()
{
timer_set(machine().primary_screen->time_until_pos(0), TIMER_PERIODIC);
timer_set(m_screen->time_until_pos(0), TIMER_PERIODIC);
m_pot_state = 0;
m_pot_latch = 0;

View File

@ -377,7 +377,7 @@ READ8_MEMBER(btime_state::audio_command_r)
READ8_MEMBER(btime_state::zoar_dsw1_read)
{
return (!machine().primary_screen->vblank() << 7) | (ioport("DSW1")->read() & 0x7f);
return (!m_screen->vblank() << 7) | (ioport("DSW1")->read() & 0x7f);
}
static INPUT_PORTS_START( btime )

View File

@ -136,10 +136,10 @@ TIMER_CALLBACK_MEMBER(capbowl_state::capbowl_update)
{
int scanline = param;
machine().primary_screen->update_partial(scanline - 1);
m_screen->update_partial(scanline - 1);
scanline += 32;
if (scanline > 240) scanline = 32;
timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_CAPBOWL_UPDATE, scanline);
timer_set(m_screen->time_until_pos(scanline), TIMER_CAPBOWL_UPDATE, scanline);
}
@ -370,7 +370,7 @@ void capbowl_state::machine_start()
void capbowl_state::machine_reset()
{
timer_set(machine().primary_screen->time_until_pos(32), TIMER_CAPBOWL_UPDATE, 32);
timer_set(m_screen->time_until_pos(32), TIMER_CAPBOWL_UPDATE, 32);
m_blitter_addr = 0;
m_last_trackball_val[0] = 0;

View File

@ -905,7 +905,7 @@ WRITE16_MEMBER(cave_state::tjumpman_leds_w)
CUSTOM_INPUT_MEMBER(cave_state::tjumpman_hopper_r)
{
return (m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0 : 1;
return (m_hopper && !(m_screen->frame_number() % 10)) ? 0 : 1;
}
static ADDRESS_MAP_START( tjumpman_map, AS_PROGRAM, 16, cave_state )

View File

@ -107,7 +107,7 @@ TIMER_CALLBACK_MEMBER(cball_state::interrupt_callback)
if (scanline >= 262)
scanline = 16;
timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_INTERRUPT, scanline);
timer_set(m_screen->time_until_pos(scanline), TIMER_INTERRUPT, scanline);
}
@ -117,7 +117,7 @@ void cball_state::machine_start()
void cball_state::machine_reset()
{
timer_set(machine().primary_screen->time_until_pos(16), TIMER_INTERRUPT, 16);
timer_set(m_screen->time_until_pos(16), TIMER_INTERRUPT, 16);
}

View File

@ -146,7 +146,7 @@ inline void ccastles_state::schedule_next_irq( int curscanline )
break;
/* next one at the start of this scanline */
m_irq_timer->adjust(machine().primary_screen->time_until_pos(curscanline), curscanline);
m_irq_timer->adjust(m_screen->time_until_pos(curscanline), curscanline);
}
@ -160,7 +160,7 @@ TIMER_CALLBACK_MEMBER(ccastles_state::clock_irq)
}
/* force an update now */
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
/* find the next edge */
schedule_next_irq(param);
@ -169,7 +169,7 @@ TIMER_CALLBACK_MEMBER(ccastles_state::clock_irq)
CUSTOM_INPUT_MEMBER(ccastles_state::get_vblank)
{
int scanline = machine().primary_screen->vpos();
int scanline = m_screen->vpos();
return m_syncprom[scanline & 0xff] & 1;
}
@ -205,7 +205,7 @@ void ccastles_state::machine_start()
/* reconfigure the visible area to match */
visarea.set(0, 255, m_vblank_end, m_vblank_start - 1);
machine().primary_screen->configure(320, 256, visarea, HZ_TO_ATTOSECONDS(PIXEL_CLOCK) * VTOTAL * HTOTAL);
m_screen->configure(320, 256, visarea, HZ_TO_ATTOSECONDS(PIXEL_CLOCK) * VTOTAL * HTOTAL);
/* configure the ROM banking */
membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0xa000, 0x6000);

View File

@ -326,6 +326,8 @@ static MACHINE_CONFIG_START( cdi, cdi_state )
MCFG_CPU_PROGRAM_MAP(cdimono1_mem)
MCFG_MCD212_ADD("mcd212")
MCFG_MCD212_SET_SCREEN("screen")
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))

View File

@ -450,7 +450,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(centiped_state::generate_interrupt)
m_maincpu->set_input_line(0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
/* do a partial update now to handle sprite multiplexing (Maze Invaders) */
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
}

View File

@ -461,7 +461,7 @@ UINT32 champbwl_state::screen_update_champbwl(screen_device &screen, bitmap_ind1
m_seta001->set_fg_yoffsets( -0x12, 0x0e );
m_seta001->set_bg_yoffsets( 0x1, -0x1 );
m_seta001->draw_sprites(bitmap, cliprect, 0x800, 1 );
m_seta001->draw_sprites(screen, bitmap, cliprect, 0x800, 1 );
return 0;
}
@ -520,7 +520,7 @@ UINT32 champbwl_state::screen_update_doraemon(screen_device &screen, bitmap_ind1
m_seta001->set_bg_yoffsets( 0x00, 0x01 );
m_seta001->set_fg_yoffsets( 0x00, 0x10 );
m_seta001->draw_sprites(bitmap, cliprect, 0x800, 1 );
m_seta001->draw_sprites(screen, bitmap, cliprect, 0x800, 1 );
return 0;
}

View File

@ -159,7 +159,7 @@ READ8_MEMBER(changela_state::changela_2d_r)
int v8 = 0;
int gas;
if ((machine().primary_screen->vpos() & 0xf8) == 0xf8)
if ((m_screen->vpos() & 0xf8) == 0xf8)
v8 = 1;
/* Gas pedal is made up of 2 switches, 1 active low, 1 active high */

View File

@ -138,13 +138,13 @@ VIDEO_START_MEMBER(chinagat_state,chinagat)
TIMER_DEVICE_CALLBACK_MEMBER(chinagat_state::chinagat_scanline)
{
int scanline = param;
int screen_height = machine().primary_screen->height();
int screen_height = m_screen->height();
int vcount_old = scanline_to_vcount((scanline == 0) ? screen_height - 1 : scanline - 1);
int vcount = scanline_to_vcount(scanline);
/* update to the current point */
if (scanline > 0)
machine().primary_screen->update_partial(scanline - 1);
m_screen->update_partial(scanline - 1);
/* on the rising edge of VBLK (vcount == F8), signal an NMI */
if (vcount == 0xf8)

View File

@ -262,8 +262,8 @@ READ8_MEMBER(cinemat_state::boxingb_dial_r)
READ8_MEMBER(cinemat_state::qb3_frame_r)
{
attotime next_update = machine().primary_screen->time_until_update();
attotime frame_period = machine().primary_screen->frame_period();
attotime next_update = m_screen->time_until_update();
attotime frame_period = m_screen->frame_period();
int percent = next_update.attoseconds / (frame_period.attoseconds / 100);
/* note this is just an approximation... */

View File

@ -213,7 +213,7 @@ TIMER_CALLBACK_MEMBER(cliffhgr_state::cliff_irq_callback)
m_maincpu->set_input_line(0, ASSERT_LINE);
}
m_irq_timer->adjust(machine().primary_screen->time_until_pos(param * 2), param);
m_irq_timer->adjust(m_screen->time_until_pos(param * 2), param);
}
WRITE_LINE_MEMBER(cliffhgr_state::vdp_interrupt)
@ -232,7 +232,7 @@ void cliffhgr_state::machine_reset()
{
m_port_bank = 0;
m_phillips_code = 0;
m_irq_timer->adjust(machine().primary_screen->time_until_pos(17), 17);
m_irq_timer->adjust(m_screen->time_until_pos(17), 17);
}
/********************************************************/

View File

@ -116,7 +116,7 @@ inline void cloud9_state::schedule_next_irq(int curscanline)
curscanline = (curscanline + 64) & 255;
/* next one at the start of this scanline */
m_irq_timer->adjust(machine().primary_screen->time_until_pos(curscanline), curscanline);
m_irq_timer->adjust(m_screen->time_until_pos(curscanline), curscanline);
}
@ -130,7 +130,7 @@ TIMER_CALLBACK_MEMBER(cloud9_state::clock_irq)
}
/* force an update now */
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
/* find the next edge */
schedule_next_irq(param);
@ -139,7 +139,7 @@ TIMER_CALLBACK_MEMBER(cloud9_state::clock_irq)
CUSTOM_INPUT_MEMBER(cloud9_state::get_vblank)
{
int scanline = machine().primary_screen->vpos();
int scanline = m_screen->vpos();
return (~m_syncprom[scanline & 0xff] >> 1) & 1;
}
@ -175,7 +175,7 @@ void cloud9_state::machine_start()
/* reconfigure the visible area to match */
visarea.set(0, 255, m_vblank_end + 1, m_vblank_start);
machine().primary_screen->configure(320, 256, visarea, HZ_TO_ATTOSECONDS(PIXEL_CLOCK) * VTOTAL * HTOTAL);
m_screen->configure(320, 256, visarea, HZ_TO_ATTOSECONDS(PIXEL_CLOCK) * VTOTAL * HTOTAL);
/* create a timer for IRQs and set up the first callback */
m_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cloud9_state::clock_irq),this));

View File

@ -110,7 +110,7 @@ WRITE16_MEMBER(cninja_state::cninja_irq_w)
&&
m_scanline > 0 &&
m_scanline < 240)
m_raster_irq_timer->adjust(machine().primary_screen->time_until_pos(m_scanline), m_scanline);
m_raster_irq_timer->adjust(m_screen->time_until_pos(m_scanline), m_scanline);
else
m_raster_irq_timer->reset();
return;
@ -127,14 +127,14 @@ WRITE16_MEMBER(cninja_state::cninja_irq_w)
WRITE16_MEMBER(cninja_state::cninja_pf12_control_w)
{
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
m_deco_tilegen1->pf_control_w(space, offset, data, mem_mask);
}
WRITE16_MEMBER(cninja_state::cninja_pf34_control_w)
{
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
m_deco_tilegen2->pf_control_w(space, offset, data, mem_mask);
}

View File

@ -547,15 +547,15 @@ void coolridr_state::video_start()
if (machine().gfx[m_gfx_index] == 0)
break;
machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites);
machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites2);
//machine().primary_screen->register_screen_bitmap(m_zbuffer_bitmap);
//machine().primary_screen->register_screen_bitmap(m_zbuffer_bitmap2);
machine().primary_screen->register_screen_bitmap(m_bg_bitmap);
machine().primary_screen->register_screen_bitmap(m_bg_bitmap2);
m_screen->register_screen_bitmap(m_temp_bitmap_sprites);
m_screen->register_screen_bitmap(m_temp_bitmap_sprites2);
//m_screen->register_screen_bitmap(m_zbuffer_bitmap);
//m_screen->register_screen_bitmap(m_zbuffer_bitmap2);
m_screen->register_screen_bitmap(m_bg_bitmap);
m_screen->register_screen_bitmap(m_bg_bitmap2);
machine().primary_screen->register_screen_bitmap(m_screen1_bitmap);
machine().primary_screen->register_screen_bitmap(m_screen2_bitmap);
m_screen->register_screen_bitmap(m_screen1_bitmap);
m_screen->register_screen_bitmap(m_screen2_bitmap);
machine().gfx[m_gfx_index] = auto_alloc(machine(), gfx_element(machine(), h1_tile_layout, m_h1_pcg, 8, 0));
}
@ -2546,7 +2546,7 @@ WRITE32_MEMBER(coolridr_state::sysh1_fb_data_w)
printf("Blitter Clear Count == 3 used with param %08x\n",data);
{
const rectangle& visarea = machine().primary_screen->visible_area();
const rectangle& visarea = m_screen->visible_area();
if(m_blitterClearMode == 0x8c200000)
{

View File

@ -81,7 +81,7 @@ void copsnrob_state::palette_init()
READ8_MEMBER(copsnrob_state::copsnrob_misc_r)
{
return machine().primary_screen->vblank() ? 0x00 : 0x80;
return m_screen->vblank() ? 0x00 : 0x80;
}
WRITE8_MEMBER(copsnrob_state::copsnrob_misc2_w)

View File

@ -418,7 +418,7 @@ READ8_MEMBER(corona_state::blitter_status_r)
-x-- ---- vblank
*/
return 0x80 | ((machine().primary_screen->vblank() & 1) << 6);
return 0x80 | ((m_screen->vblank() & 1) << 6);
}
void corona_state::blitter_execute(int x, int y, int color, int width, int flag)

View File

@ -306,13 +306,13 @@ WRITE8_MEMBER(cosmic_state::cosmica_sound_output_w)
READ8_MEMBER(cosmic_state::cosmica_pixel_clock_r)
{
return (machine().primary_screen->vpos() >> 2) & 0x3f;
return (m_screen->vpos() >> 2) & 0x3f;
}
READ8_MEMBER(cosmic_state::cosmicg_port_0_r)
{
/* The top four address lines from the CRTC are bits 0-3 */
return (ioport("IN0")->read() & 0xf0) | ((machine().primary_screen->vpos() & 0xf0) >> 4);
return (ioport("IN0")->read() & 0xf0) | ((m_screen->vpos() & 0xf0) >> 4);
}
READ8_MEMBER(cosmic_state::magspot_coinage_dip_r)

View File

@ -641,7 +641,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::cps2_interrupt)
m_cps_b_regs[0x10/2] = 0;
m_maincpu->set_input_line(4, HOLD_LINE);
cps2_set_sprite_priorities();
timer.machine().primary_screen->update_partial(param);
m_screen->update_partial(param);
m_scancalls++;
// popmessage("IRQ4 scancounter = %04i", param);
}
@ -652,7 +652,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::cps2_interrupt)
m_cps_b_regs[0x12 / 2] = 0;
m_maincpu->set_input_line(4, HOLD_LINE);
cps2_set_sprite_priorities();
timer.machine().primary_screen->update_partial(param);
m_screen->update_partial(param);
m_scancalls++;
// popmessage("IRQ4 scancounter = %04i", param);
}
@ -665,7 +665,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::cps2_interrupt)
if(m_scancalls)
{
cps2_set_sprite_priorities();
timer.machine().primary_screen->update_partial(256);
m_screen->update_partial(256);
}
cps2_objram_latch();
}

View File

@ -1130,7 +1130,7 @@ UINT32 cps3_state::screen_update_cps3(screen_device &screen, bitmap_rgb32 &bitma
if (current_ypos&0x200) current_ypos-=0x400;
//if ( (whichbpp) && (machine().primary_screen->frame_number() & 1)) continue;
//if ( (whichbpp) && (m_screen->frame_number() & 1)) continue;
/* use the palette value from the main list or the sublists? */
if (whichpal)

View File

@ -116,7 +116,7 @@ void cubeqst_state::palette_init()
WRITE16_MEMBER(cubeqst_state::palette_w)
{
machine().primary_screen->update_now();
m_screen->update_now();
COMBINE_DATA(&m_generic_paletteram_16[offset]);
}
@ -199,7 +199,7 @@ UINT32 cubeqst_state::screen_update_cubeqst(screen_device &screen, bitmap_rgb32
READ16_MEMBER(cubeqst_state::line_r)
{
/* I think this is unusued */
return machine().primary_screen->vpos();
return m_screen->vpos();
}
INTERRUPT_GEN_MEMBER(cubeqst_state::vblank)

View File

@ -62,7 +62,7 @@ MACHINE_START_MEMBER(cyberbal_state,cyberbal)
MACHINE_RESET_MEMBER(cyberbal_state,cyberbal)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
cyberbal_sound_reset();
@ -74,7 +74,7 @@ MACHINE_RESET_MEMBER(cyberbal_state,cyberbal)
MACHINE_RESET_MEMBER(cyberbal_state,cyberbal2p)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -3270,7 +3270,7 @@ ADDRESS_MAP_END
UINT8 ddenlovr_state::hgokou_player_r(int player )
{
UINT8 hopper_bit = ((m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0 : (1 << 6));
UINT8 hopper_bit = ((m_hopper && !(m_screen->frame_number() % 10)) ? 0 : (1 << 6));
if (!BIT(m_input_sel, 0)) return ioport(player ? "KEY5" : "KEY0")->read() | hopper_bit;
if (!BIT(m_input_sel, 1)) return ioport(player ? "KEY6" : "KEY1")->read() | hopper_bit;
@ -4120,7 +4120,7 @@ READ8_MEMBER(ddenlovr_state::htengoku_coin_r)
{
case 0x00: return ioport("COINS")->read();
case 0x01: return 0xff; //?
case 0x02: return 0xbf | ((m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0 : (1 << 6)); // bit 7 = blitter busy, bit 6 = hopper
case 0x02: return 0xbf | ((m_hopper && !(m_screen->frame_number() % 10)) ? 0 : (1 << 6)); // bit 7 = blitter busy, bit 6 = hopper
case 0x03: return m_coins;
}
logerror("%04x: coin_r with select = %02x\n", space.device().safe_pc(), m_input_sel);
@ -4254,7 +4254,7 @@ READ8_MEMBER(ddenlovr_state::daimyojn_keyb1_r)
{
UINT8 val = 0x3f;
UINT8 hopper_bit = ((m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0 : (1 << 6));
UINT8 hopper_bit = ((m_hopper && !(m_screen->frame_number() % 10)) ? 0 : (1 << 6));
if (!BIT(m_keyb, 0)) val = ioport("KEY0")->read() | hopper_bit;
else if (!BIT(m_keyb, 1)) val = ioport("KEY1")->read() | hopper_bit;

View File

@ -119,13 +119,13 @@ int ddragon_state::scanline_to_vcount( int scanline )
TIMER_DEVICE_CALLBACK_MEMBER(ddragon_state::ddragon_scanline)
{
int scanline = param;
int screen_height = machine().primary_screen->height();
int screen_height = m_screen->height();
int vcount_old = scanline_to_vcount((scanline == 0) ? screen_height - 1 : scanline - 1);
int vcount = scanline_to_vcount(scanline);
/* update to the current point */
if (scanline > 0)
machine().primary_screen->update_partial(scanline - 1);
m_screen->update_partial(scanline - 1);
/* on the rising edge of VBLK (vcount == F8), signal an NMI */
if (vcount == 0xf8)

View File

@ -520,14 +520,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_state::ddragon3_scanline)
if (scanline % 16 == 0)
{
if (scanline > 0)
machine().primary_screen->update_partial(scanline - 1);
m_screen->update_partial(scanline - 1);
m_maincpu->set_input_line(5, ASSERT_LINE);
}
/* Vblank is raised on scanline 248 */
if (scanline == 248)
{
machine().primary_screen->update_partial(scanline - 1);
m_screen->update_partial(scanline - 1);
m_maincpu->set_input_line(6, ASSERT_LINE);
}
}

View File

@ -301,7 +301,7 @@ READ32_MEMBER(deco32_state::deco32_irq_controller_r)
/* ZV03082007 - video_screen_get_vblank() doesn't work for Captain America, as it expects
that this bit is NOT set in rows 0-7. */
vblank = machine().primary_screen->vpos() > machine().primary_screen->visible_area().max_y;
vblank = m_screen->vpos() > m_screen->visible_area().max_y;
if (vblank)
return 0xffffff80 | 0x1 | 0x10; /* Assume VBL takes priority over possible raster/lightgun irq */
@ -327,7 +327,7 @@ WRITE32_MEMBER(deco32_state::deco32_irq_controller_w)
scanline=(data&0xff);
if (m_raster_enable && scanline>0 && scanline<240)
{
m_raster_irq_timer->adjust(machine().primary_screen->time_until_pos(scanline-1, 0));
m_raster_irq_timer->adjust(m_screen->time_until_pos(scanline-1, 0));
}
else
m_raster_irq_timer->reset();

View File

@ -315,7 +315,7 @@ ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER( deco_ld_state::begas_vblank_r )
{
return machine().primary_screen->vpos() >= 240*2;
return m_screen->vpos() >= 240*2;
}
INPUT_CHANGED_MEMBER(deco_ld_state::coin_inserted)

View File

@ -174,8 +174,8 @@ READ32_MEMBER(deco_mlc_state::mlc_20007c_r)
READ32_MEMBER(deco_mlc_state::mlc_scanline_r)
{
// logerror("read scanline counter (%d)\n", machine().primary_screen->vpos());
return machine().primary_screen->vpos();
// logerror("read scanline counter (%d)\n", m_screen->vpos());
return m_screen->vpos();
}
@ -212,7 +212,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(deco_mlc_state::interrupt_gen)
WRITE32_MEMBER(deco_mlc_state::mlc_irq_w)
{
// int scanline=machine().primary_screen->vpos();
// int scanline=m_screen->vpos();
COMBINE_DATA(&m_irq_ram[offset]);
@ -222,8 +222,8 @@ WRITE32_MEMBER(deco_mlc_state::mlc_irq_w)
m_maincpu->set_input_line(m_mainCpuIsArm ? ARM_IRQ_LINE : 1, CLEAR_LINE);
return;
case 0x14: /* Prepare scanline interrupt */
m_raster_irq_timer->adjust(machine().primary_screen->time_until_pos(m_irq_ram[0x14/4]));
//logerror("prepare scanline to fire at %d (currently on %d)\n", m_irq_ram[0x14/4], machine().primary_screen->vpos());
m_raster_irq_timer->adjust(m_screen->time_until_pos(m_irq_ram[0x14/4]));
//logerror("prepare scanline to fire at %d (currently on %d)\n", m_irq_ram[0x14/4], m_screen->vpos());
return;
default:

View File

@ -176,14 +176,14 @@ TIMER_CALLBACK_MEMBER(destroyr_state::destroyr_frame_callback)
m_potsense[1] = 0;
/* PCB supports two dials, but cab has only got one */
timer_set(machine().primary_screen->time_until_pos(ioport("PADDLE")->read()), TIMER_DESTROYR_DIAL);
timer_set(machine().primary_screen->time_until_pos(0), TIMER_DESTROYR_FRAME);
timer_set(m_screen->time_until_pos(ioport("PADDLE")->read()), TIMER_DESTROYR_DIAL);
timer_set(m_screen->time_until_pos(0), TIMER_DESTROYR_FRAME);
}
void destroyr_state::machine_reset()
{
timer_set(machine().primary_screen->time_until_pos(0), TIMER_DESTROYR_FRAME);
timer_set(m_screen->time_until_pos(0), TIMER_DESTROYR_FRAME);
m_cursor = 0;
m_wavemod = 0;
@ -282,7 +282,7 @@ READ8_MEMBER(destroyr_state::destroyr_input_r)
READ8_MEMBER(destroyr_state::destroyr_scanline_r)
{
return machine().primary_screen->vpos();
return m_screen->vpos();
}

View File

@ -105,7 +105,7 @@ void diverboy_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipr
bank = (source[1] & 0x0002) >> 1;
if (!flash || (machine().primary_screen->frame_number() & 1))
if (!flash || (m_screen->frame_number() & 1))
{
drawgfx_transpen(bitmap,cliprect,machine().gfx[bank],
number,

View File

@ -134,7 +134,7 @@ WRITE8_MEMBER(dorachan_state::dorachan_ctrl_w)
CUSTOM_INPUT_MEMBER(dorachan_state::dorachan_v128_r)
{
/* to avoid resetting (when player 2 starts) bit 0 need to be inverted when screen is flipped */
return ((machine().primary_screen->vpos() >> 7) & 0x01) ^ m_flip_screen;
return ((m_screen->vpos() >> 7) & 0x01) ^ m_flip_screen;
}

View File

@ -61,7 +61,7 @@ WRITE8_MEMBER(dotrikun_state::dotrikun_color_w)
*/
m_color = data;
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
}

View File

@ -157,7 +157,7 @@ READ8_MEMBER(dragrace_state::dragrace_steering_r)
READ8_MEMBER(dragrace_state::dragrace_scanline_r)
{
return (machine().primary_screen->vpos() ^ 0xf0) | 0x0f;
return (m_screen->vpos() ^ 0xf0) | 0x0f;
}

View File

@ -438,7 +438,7 @@ WRITE8_MEMBER(dunhuang_state::dunhuang_input_w)
READ8_MEMBER(dunhuang_state::dunhuang_service_r)
{
return ioport("SERVICE")->read()
| ((m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0x00 : 0x08) // bit 3: hopper sensor
| ((m_hopper && !(m_screen->frame_number() % 10)) ? 0x00 : 0x08) // bit 3: hopper sensor
| 0x80 // bit 7 low -> tiles block transferrer busy
;
}

View File

@ -134,7 +134,7 @@ TIMER_CALLBACK_MEMBER(enigma2_state::interrupt_assert_callback)
int next_vpos;
/* compute vector and set the interrupt line */
int vpos = machine().primary_screen->vpos();
int vpos = m_screen->vpos();
UINT16 counter = vpos_to_vysnc_chain_counter(vpos);
UINT8 vector = 0xc7 | ((counter & 0x80) >> 3) | ((~counter & 0x80) >> 4);
m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector);
@ -146,8 +146,8 @@ TIMER_CALLBACK_MEMBER(enigma2_state::interrupt_assert_callback)
next_counter = INT_TRIGGER_COUNT_1;
next_vpos = vysnc_chain_counter_to_vpos(next_counter);
m_interrupt_assert_timer->adjust(machine().primary_screen->time_until_pos(next_vpos));
m_interrupt_clear_timer->adjust(machine().primary_screen->time_until_pos(vpos + 1));
m_interrupt_assert_timer->adjust(m_screen->time_until_pos(next_vpos));
m_interrupt_clear_timer->adjust(m_screen->time_until_pos(vpos + 1));
}
@ -161,7 +161,7 @@ void enigma2_state::create_interrupt_timers( )
void enigma2_state::start_interrupt_timers( )
{
int vpos = vysnc_chain_counter_to_vpos(INT_TRIGGER_COUNT_1);
m_interrupt_assert_timer->adjust(machine().primary_screen->time_until_pos(vpos));
m_interrupt_assert_timer->adjust(m_screen->time_until_pos(vpos));
}

View File

@ -113,7 +113,7 @@ CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank)
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context(), eolith_vblank);
return (machine().primary_screen->vpos() >= 240);
return (m_screen->vpos() >= 240);
}
// StealSee doesn't use interrupts, just the vblank
@ -125,5 +125,5 @@ CUSTOM_INPUT_MEMBER(eolith_state::stealsee_speedup_getvblank)
if(!eolith_vblank)
m_maincpu->eat_cycles(500);
return (machine().primary_screen->vpos() >= 240);
return (m_screen->vpos() >= 240);
}

View File

@ -49,7 +49,7 @@ void eprom_state::update_interrupts()
MACHINE_RESET_MEMBER(eprom_state,eprom)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 8);
scanline_timer_reset(*m_screen, 8);
}

View File

@ -94,7 +94,7 @@ READ8_MEMBER(esripsys_state::uart_r)
READ8_MEMBER(esripsys_state::g_status_r)
{
int bank4 = BIT(m_videocpu->get_rip_status(), 2);
int vblank = machine().primary_screen->vblank();
int vblank = m_screen->vblank();
return (!vblank << 7) | (bank4 << 6) | (m_f_status & 0x2f);
}
@ -141,7 +141,7 @@ WRITE8_MEMBER(esripsys_state::g_status_w)
READ8_MEMBER(esripsys_state::f_status_r)
{
int vblank = machine().primary_screen->vblank();
int vblank = m_screen->vblank();
UINT8 rip_status = m_videocpu->get_rip_status();
rip_status = (rip_status & 0x18) | (BIT(rip_status, 6) << 1) | BIT(rip_status, 7);

View File

@ -190,7 +190,7 @@ READ8_MEMBER(fantland_state::borntofi_inputs_r)
x = ioport(offset ? "P2 Trackball X" : "P1 Trackball X")->read();
y = ioport(offset ? "P2 Trackball Y" : "P1 Trackball Y")->read();
f = machine().primary_screen->frame_number();
f = m_screen->frame_number();
m_input_ret[offset] = (m_input_ret[offset] & 0x14) | (ioport(offset ? "P2_TRACK" : "P1_TRACK")->read() & 0xc3);

View File

@ -93,12 +93,12 @@ TIMER_CALLBACK_MEMBER(fgoal_state::interrupt_callback)
m_prev_coin = coin;
scanline = machine().primary_screen->vpos() + 128;
scanline = m_screen->vpos() + 128;
if (scanline > 256)
scanline = 0;
timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_INTERRUPT);
timer_set(m_screen->time_until_pos(scanline), TIMER_INTERRUPT);
}
@ -116,7 +116,7 @@ READ8_MEMBER(fgoal_state::fgoal_analog_r)
CUSTOM_INPUT_MEMBER(fgoal_state::fgoal_80_r)
{
UINT8 ret = (machine().primary_screen->vpos() & 0x80) ? 1 : 0;
UINT8 ret = (m_screen->vpos() & 0x80) ? 1 : 0;
return ret;
}
@ -349,7 +349,7 @@ void fgoal_state::machine_start()
void fgoal_state::machine_reset()
{
timer_set(machine().primary_screen->time_until_pos(0), TIMER_INTERRUPT);
timer_set(m_screen->time_until_pos(0), TIMER_INTERRUPT);
m_xpos = 0;
m_ypos = 0;

View File

@ -218,7 +218,7 @@ void firefox_state::video_start()
{
m_bgtiles = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(firefox_state::bgtile_get_info),this), TILEMAP_SCAN_ROWS, 8,8, 64,64);
m_bgtiles->set_transparent_pen(0);
m_bgtiles->set_scrolldy(machine().primary_screen->visible_area().min_y, 0);
m_bgtiles->set_scrolldy(m_screen->visible_area().min_y, 0);
}
@ -259,7 +259,7 @@ UINT32 firefox_state::screen_update_firefox(screen_device &screen, bitmap_rgb32
TIMER_DEVICE_CALLBACK_MEMBER(firefox_state::video_timer_callback)
{
machine().primary_screen->update_now();
m_screen->update_now();
m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE );
}

View File

@ -80,7 +80,7 @@ TIMER_CALLBACK_MEMBER(firetrk_state::periodic_callback)
if (scanline > 262)
scanline = 0;
timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_PERIODIC, scanline);
timer_set(m_screen->time_until_pos(scanline), TIMER_PERIODIC, scanline);
}

View File

@ -182,12 +182,12 @@ TIMER_CALLBACK_MEMBER(flyball_state::flyball_quarter_callback)
for (i = 0; i < 64; i++)
if (potsense[i] != 0)
timer_set(machine().primary_screen->time_until_pos(scanline + i), TIMER_FLYBALL_JOYSTICK, potsense[i]);
timer_set(m_screen->time_until_pos(scanline + i), TIMER_FLYBALL_JOYSTICK, potsense[i]);
scanline += 0x40;
scanline &= 0xff;
timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_FLYBALL_QUARTER, scanline);
timer_set(m_screen->time_until_pos(scanline), TIMER_FLYBALL_QUARTER, scanline);
m_potsense = 0;
m_potmask = 0;
@ -208,7 +208,7 @@ READ8_MEMBER(flyball_state::flyball_input_r)
READ8_MEMBER(flyball_state::flyball_scanline_r)
{
return machine().primary_screen->vpos() & 0x3f;
return m_screen->vpos() & 0x3f;
}
READ8_MEMBER(flyball_state::flyball_potsense_r)
@ -421,7 +421,7 @@ void flyball_state::machine_reset()
m_maincpu->reset();
timer_set(machine().primary_screen->time_until_pos(0), TIMER_FLYBALL_QUARTER);
timer_set(m_screen->time_until_pos(0), TIMER_FLYBALL_QUARTER);
m_pitcher_vert = 0;
m_pitcher_horz = 0;

View File

@ -130,7 +130,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update_timer)
scanline = 0;
/* set a timer for it */
timer.adjust(machine().primary_screen->time_until_pos(scanline), scanline);
timer.adjust(m_screen->time_until_pos(scanline), scanline);
}
@ -144,7 +144,7 @@ MACHINE_START_MEMBER(foodf_state,foodf)
MACHINE_RESET_MEMBER(foodf_state,foodf)
{
timer_device *scan_timer = machine().device<timer_device>("scan_timer");
scan_timer->adjust(machine().primary_screen->time_until_pos(0));
scan_timer->adjust(m_screen->time_until_pos(0));
}

View File

@ -66,9 +66,9 @@ WRITE16_MEMBER(fuuki16_state::fuuki16_vregs_w)
UINT16 new_data = COMBINE_DATA(&m_vregs[offset]);
if ((offset == 0x1c/2) && old_data != new_data)
{
const rectangle &visarea = machine().primary_screen->visible_area();
attotime period = machine().primary_screen->frame_period();
m_raster_interrupt_timer->adjust(machine().primary_screen->time_until_pos(new_data, visarea.max_x + 1), 0, period);
const rectangle &visarea = m_screen->visible_area();
attotime period = m_screen->frame_period();
m_raster_interrupt_timer->adjust(m_screen->time_until_pos(new_data, visarea.max_x + 1), 0, period);
}
}
@ -410,16 +410,16 @@ void fuuki16_state::device_timer(emu_timer &timer, device_timer_id id, int param
{
case TIMER_LEVEL_1_INTERRUPT:
m_maincpu->set_input_line(1, HOLD_LINE);
timer_set(machine().primary_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
timer_set(m_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
break;
case TIMER_VBLANK_INTERRUPT:
m_maincpu->set_input_line(3, HOLD_LINE); // VBlank IRQ
timer_set(machine().primary_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
timer_set(m_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
break;
case TIMER_RASTER_INTERRUPT:
m_maincpu->set_input_line(5, HOLD_LINE); // Raster Line IRQ
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_raster_interrupt_timer->adjust(machine().primary_screen->frame_period());
m_screen->update_partial(m_screen->vpos());
m_raster_interrupt_timer->adjust(m_screen->frame_period());
break;
default:
assert_always(FALSE, "Unknown id in fuuki16_state::device_timer");
@ -439,11 +439,11 @@ void fuuki16_state::machine_start()
void fuuki16_state::machine_reset()
{
const rectangle &visarea = machine().primary_screen->visible_area();
const rectangle &visarea = m_screen->visible_area();
timer_set(machine().primary_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
timer_set(machine().primary_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
m_raster_interrupt_timer->adjust(machine().primary_screen->time_until_pos(0, visarea.max_x + 1));
timer_set(m_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
timer_set(m_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
m_raster_interrupt_timer->adjust(m_screen->time_until_pos(0, visarea.max_x + 1));
}

View File

@ -225,9 +225,9 @@ WRITE32_MEMBER(fuuki32_state::fuuki32_vregs_w)
COMBINE_DATA(&m_vregs[offset]);
if (offset == 0x1c / 4)
{
const rectangle &visarea = machine().primary_screen->visible_area();
attotime period = machine().primary_screen->frame_period();
m_raster_interrupt_timer->adjust(machine().primary_screen->time_until_pos(m_vregs[0x1c / 4] >> 16, visarea.max_x + 1), 0, period);
const rectangle &visarea = m_screen->visible_area();
attotime period = m_screen->frame_period();
m_raster_interrupt_timer->adjust(m_screen->time_until_pos(m_vregs[0x1c / 4] >> 16, visarea.max_x + 1), 0, period);
}
}
}
@ -527,16 +527,16 @@ void fuuki32_state::device_timer(emu_timer &timer, device_timer_id id, int param
{
case TIMER_LEVEL_1_INTERRUPT:
m_maincpu->set_input_line(1, HOLD_LINE);
timer_set(machine().primary_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
timer_set(m_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
break;
case TIMER_VBLANK_INTERRUPT:
m_maincpu->set_input_line(3, HOLD_LINE); // VBlank IRQ
timer_set(machine().primary_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
timer_set(m_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
break;
case TIMER_RASTER_INTERRUPT:
m_maincpu->set_input_line(5, HOLD_LINE); // Raster Line IRQ
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_raster_interrupt_timer->adjust(machine().primary_screen->frame_period());
m_screen->update_partial(m_screen->vpos());
m_raster_interrupt_timer->adjust(m_screen->frame_period());
break;
default:
assert_always(FALSE, "Unknown id in fuuki32_state::device_timer");
@ -559,11 +559,11 @@ void fuuki32_state::machine_start()
void fuuki32_state::machine_reset()
{
const rectangle &visarea = machine().primary_screen->visible_area();
const rectangle &visarea = m_screen->visible_area();
timer_set(machine().primary_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
timer_set(machine().primary_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
m_raster_interrupt_timer->adjust(machine().primary_screen->time_until_pos(0, visarea.max_x + 1));
timer_set(m_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT);
timer_set(m_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT);
m_raster_interrupt_timer->adjust(m_screen->time_until_pos(0, visarea.max_x + 1));
}

View File

@ -250,7 +250,7 @@ MACHINE_RESET_MEMBER(gaelco3d_state,gaelco3d2)
INTERRUPT_GEN_MEMBER(gaelco3d_state::vblank_gen)
{
gaelco3d_render(*machine().primary_screen);
gaelco3d_render(*m_screen);
device.execute().set_input_line(2, ASSERT_LINE);
}

View File

@ -866,7 +866,7 @@ TIMER_CALLBACK_MEMBER(galaga_state::cpu3_interrupt_callback)
scanline = 64;
/* the vertical synch chain is clocked by H256 -- this is probably not important, but oh well */
m_cpu3_interrupt_timer->adjust(machine().primary_screen->time_until_pos(scanline), scanline);
m_cpu3_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
@ -896,7 +896,7 @@ MACHINE_RESET_MEMBER(galaga_state,galaga)
/* Reset all latches */
bosco_latch_reset();
m_cpu3_interrupt_timer->adjust(machine().primary_screen->time_until_pos(64), 64);
m_cpu3_interrupt_timer->adjust(m_screen->time_until_pos(64), 64);
}
MACHINE_RESET_MEMBER(xevious_state,battles)

View File

@ -270,12 +270,12 @@ WRITE16_MEMBER(galaxi_state::galaxi_500004_w)
CUSTOM_INPUT_MEMBER(galaxi_state::ticket_r)
{
return m_ticket && !(machine().primary_screen->frame_number() % 10);
return m_ticket && !(m_screen->frame_number() % 10);
}
CUSTOM_INPUT_MEMBER(galaxi_state::hopper_r)
{
return m_hopper && !(machine().primary_screen->frame_number() % 10);
return m_hopper && !(m_screen->frame_number() % 10);
}

View File

@ -82,14 +82,14 @@ INTERRUPT_GEN_MEMBER(galaxia_state::galaxia_interrupt)
WRITE8_MEMBER(galaxia_state::galaxia_video_w)
{
// machine().primary_screen->update_partial(machine().primary_screen->vpos());
// m_screen->update_partial(m_screen->vpos());
m_bg_tilemap->mark_tile_dirty(offset);
cvs_video_or_color_ram_w(space, offset, data);
}
WRITE8_MEMBER(galaxia_state::galaxia_scroll_w)
{
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
// fixed scrolling area
for (int i = 1; i < 6; i++)
@ -109,13 +109,13 @@ WRITE8_MEMBER(galaxia_state::galaxia_dataport_w)
READ8_MEMBER(galaxia_state::galaxia_collision_r)
{
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
return m_collision_register;
}
READ8_MEMBER(galaxia_state::galaxia_collision_clear)
{
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
m_collision_register = 0;
return 0xff;
}

View File

@ -2253,7 +2253,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::timefgtr_scanline)
// change spriteram base per each 64-line part of the screen
if ((split & 0x3f) == 0)
{
machine().primary_screen->update_now();
m_screen->update_now();
m_sprites_base = 0x40 | (split << 2 & 0x300);
}
}

View File

@ -229,7 +229,7 @@ ADDRESS_MAP_END
READ16_MEMBER(galpanic_state::comad_timer_r)
{
return (machine().primary_screen->vpos() & 0x07) << 8;
return (m_screen->vpos() & 0x07) << 8;
}
/* a kludge! */

View File

@ -165,7 +165,7 @@ MACHINE_RESET_MEMBER(gauntlet_state,gauntlet)
m_sound_reset_val = 1;
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 32);
scanline_timer_reset(*m_screen, 32);
}

View File

@ -192,7 +192,7 @@ PALETTE_INIT_MEMBER(gei_state,quizvid)
void gei_state::video_start()
{
machine().primary_screen->register_screen_bitmap(m_bitmap);
m_screen->register_screen_bitmap(m_bitmap);
}
UINT32 gei_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)

View File

@ -207,8 +207,8 @@ UINT32 go2000_state::screen_update_go2000(screen_device &screen, bitmap_ind16 &b
}
/*Sprite RAM code actually copied from video/suna16.c with minor modifications.*/
int max_x = machine().primary_screen->width() - 8;
int max_y = machine().primary_screen->height() - 8;
int max_x = m_screen->width() - 8;
int max_y = m_screen->height() - 8;
for (int offs = 0xf800 / 2; offs < 0x10000 / 2 ; offs += 4/2)
{

View File

@ -264,7 +264,7 @@ void gottlieb_state::machine_reset()
{
/* if we have a laserdisc, reset our philips code callback for the next line 17 */
if (m_laserdisc != NULL)
m_laserdisc_philips_timer->adjust(machine().primary_screen->time_until_pos(17), 17);
m_laserdisc_philips_timer->adjust(m_screen->time_until_pos(17), 17);
}
@ -439,7 +439,7 @@ TIMER_CALLBACK_MEMBER(gottlieb_state::laserdisc_philips_callback)
/* toggle to the next one */
param = (param == 17) ? 18 : 17;
m_laserdisc_philips_timer->adjust(machine().primary_screen->time_until_pos(param * 2), param);
m_laserdisc_philips_timer->adjust(m_screen->time_until_pos(param * 2), param);
}
@ -681,7 +681,7 @@ INTERRUPT_GEN_MEMBER(gottlieb_state::gottlieb_interrupt)
{
/* assert the NMI and set a timer to clear it at the first visible line */
device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
timer_set(machine().primary_screen->time_until_pos(0), TIMER_NMI_CLEAR);
timer_set(m_screen->time_until_pos(0), TIMER_NMI_CLEAR);
/* if we have a laserdisc, update it */
if (m_laserdisc != NULL)

View File

@ -334,7 +334,7 @@ UINT8 grchamp_state::get_pc3259_bits(int offs)
int bits;
/* force a partial update to the current position */
machine().primary_screen->update_partial(machine().primary_screen->vpos());
m_screen->update_partial(m_screen->vpos());
/* get the relevant 4 bits */
bits = (m_collide >> (offs*4)) & 0x0f;

View File

@ -103,15 +103,15 @@ TIMER_CALLBACK_MEMBER(gridlee_state::irq_timer_tick)
{
/* next interrupt after scanline 256 is scanline 64 */
if (param == 256)
m_irq_timer->adjust(machine().primary_screen->time_until_pos(64), 64);
m_irq_timer->adjust(m_screen->time_until_pos(64), 64);
else
m_irq_timer->adjust(machine().primary_screen->time_until_pos(param + 64), param + 64);
m_irq_timer->adjust(m_screen->time_until_pos(param + 64), param + 64);
/* IRQ starts on scanline 0, 64, 128, etc. */
m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */
m_irq_off->adjust(machine().primary_screen->time_until_pos(param, GRIDLEE_HBSTART));
m_irq_off->adjust(m_screen->time_until_pos(param, GRIDLEE_HBSTART));
}
@ -124,13 +124,13 @@ TIMER_CALLBACK_MEMBER(gridlee_state::firq_off_tick)
TIMER_CALLBACK_MEMBER(gridlee_state::firq_timer_tick)
{
/* same time next frame */
m_firq_timer->adjust(machine().primary_screen->time_until_pos(FIRQ_SCANLINE));
m_firq_timer->adjust(m_screen->time_until_pos(FIRQ_SCANLINE));
/* IRQ starts on scanline FIRQ_SCANLINE? */
m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */
m_firq_off->adjust(machine().primary_screen->time_until_pos(FIRQ_SCANLINE, GRIDLEE_HBSTART));
m_firq_off->adjust(m_screen->time_until_pos(FIRQ_SCANLINE, GRIDLEE_HBSTART));
}
void gridlee_state::machine_start()
@ -151,8 +151,8 @@ void gridlee_state::machine_start()
void gridlee_state::machine_reset()
{
/* start timers to generate interrupts */
m_irq_timer->adjust(machine().primary_screen->time_until_pos(0));
m_firq_timer->adjust(machine().primary_screen->time_until_pos(FIRQ_SCANLINE));
m_irq_timer->adjust(m_screen->time_until_pos(0));
m_firq_timer->adjust(m_screen->time_until_pos(FIRQ_SCANLINE));
}

View File

@ -140,7 +140,7 @@ UINT8 hitme_state::read_port_and_t0( int port )
UINT8 hitme_state::read_port_and_t0_and_hblank( int port )
{
UINT8 val = read_port_and_t0(port);
if (machine().primary_screen->hpos() < (machine().primary_screen->width() * 9 / 10))
if (m_screen->hpos() < (m_screen->width() * 9 / 10))
val ^= 0x04;
return val;
}

View File

@ -892,7 +892,7 @@ WRITE32_MEMBER(hng64_state::tcram_w)
if(offset == 0x02)
{
UINT16 min_x, min_y, max_x, max_y;
rectangle visarea = machine().primary_screen->visible_area();
rectangle visarea = m_screen->visible_area();
min_x = (hng64_tcram[1] & 0xffff0000) >> 16;
min_y = (hng64_tcram[1] & 0x0000ffff) >> 0;
@ -908,7 +908,7 @@ WRITE32_MEMBER(hng64_state::tcram_w)
m_screen_dis = 0;
visarea.set(min_x, min_x + max_x - 1, min_y, min_y + max_y - 1);
machine().primary_screen->configure(HTOTAL, VTOTAL, visarea, machine().primary_screen->frame_period().attoseconds );
m_screen->configure(HTOTAL, VTOTAL, visarea, m_screen->frame_period().attoseconds );
}
}

View File

@ -365,7 +365,7 @@ UINT32 igs009_state::screen_update_jingbell(screen_device &screen, bitmap_ind16
CUSTOM_INPUT_MEMBER(igs009_state::hopper_r)
{
return m_hopper && !(machine().primary_screen->frame_number()%10);
return m_hopper && !(m_screen->frame_number()%10);
}

View File

@ -462,7 +462,7 @@ WRITE16_MEMBER(igs011_state::igs011_blit_flags_w)
int gfx_size = memregion("blitter")->bytes();
int gfx2_size = memregion("blitter_hi")->bytes();
const rectangle &clip = machine().primary_screen->visible_area();
const rectangle &clip = m_screen->visible_area();
COMBINE_DATA(&blitter.flags);
@ -567,7 +567,7 @@ WRITE16_MEMBER(igs011_state::igs011_blit_flags_w)
CUSTOM_INPUT_MEMBER(igs011_state::igs_hopper_r)
{
return (m_igs_hopper && ((machine().primary_screen->frame_number()/5)&1)) ? 0x0000 : 0x0001;
return (m_igs_hopper && ((m_screen->frame_number()/5)&1)) ? 0x0000 : 0x0001;
}
WRITE16_MEMBER(igs011_state::igs_dips_w)

View File

@ -1567,7 +1567,7 @@ READ16_MEMBER(igs017_state::sdmg2_magic_r)
{
case 0x00:
{
UINT16 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x0000 : 0x0001;
UINT16 hopper_bit = (m_hopper && ((m_screen->frame_number()/10)&1)) ? 0x0000 : 0x0001;
return ioport("COINS")->read() | hopper_bit;
}
@ -1688,7 +1688,7 @@ READ16_MEMBER(igs017_state::mgdha_magic_r)
case 0x03:
{
UINT16 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x0000 : 0x0001;
UINT16 hopper_bit = (m_hopper && ((m_screen->frame_number()/10)&1)) ? 0x0000 : 0x0001;
return ioport("COINS")->read() | hopper_bit;
}
@ -1772,7 +1772,7 @@ READ8_MEMBER(igs017_state::tjsb_input_r)
case 0x02: return ioport("COINS")->read();
case 0x03:
{
UINT8 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x00 : 0x20;
UINT8 hopper_bit = (m_hopper && ((m_screen->frame_number()/10)&1)) ? 0x00 : 0x20;
return ioport("HOPPER")->read() | hopper_bit;
}
@ -2215,7 +2215,7 @@ READ16_MEMBER(igs017_state::lhzb2a_input_r)
case 0x02:
{
UINT16 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x0000 : 0x0002;
UINT16 hopper_bit = (m_hopper && ((m_screen->frame_number()/10)&1)) ? 0x0000 : 0x0002;
return (ioport("DSW1")->read() << 8) | ioport("COINS")->read() | hopper_bit;
}

View File

@ -346,7 +346,7 @@ WRITE8_MEMBER(igspoker_state::custom_io_w)
CUSTOM_INPUT_MEMBER(igspoker_state::hopper_r)
{
if (m_hopper) return !(machine().primary_screen->frame_number()%10);
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
}

View File

@ -420,7 +420,7 @@ INTERRUPT_GEN_MEMBER(itech32_state::generate_int1)
{
/* signal the NMI */
itech32_update_interrupts(1, -1, -1);
if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", machine().primary_screen->vpos());
if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", m_screen->vpos());
}
@ -503,7 +503,7 @@ READ32_MEMBER(itech32_state::trackball32_4bit_p1_r)
{
attotime curtime = machine().time();
if ((curtime - m_p1_lasttime) > machine().primary_screen->scan_period())
if ((curtime - m_p1_lasttime) > m_screen->scan_period())
{
int upper, lower;
int dx, dy;
@ -539,7 +539,7 @@ READ32_MEMBER(itech32_state::trackball32_4bit_p2_r)
{
attotime curtime = machine().time();
if ((curtime - m_p2_lasttime) > machine().primary_screen->scan_period())
if ((curtime - m_p2_lasttime) > m_screen->scan_period())
{
int upper, lower;
int dx, dy;

View File

@ -614,7 +614,7 @@ INTERRUPT_GEN_MEMBER(itech8_state::generate_nmi)
itech8_update_interrupts(1, -1, -1);
machine().scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(itech8_state::irq_off),this));
if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", machine().primary_screen->vpos());
if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", m_screen->vpos());
}
@ -644,7 +644,7 @@ WRITE_LINE_MEMBER(itech8_state::generate_sound_irq)
MACHINE_START_MEMBER(itech8_state,sstrike)
{
/* we need to update behind the beam as well */
machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), timer_expired_delegate(FUNC(itech8_state::behind_the_beam_update),this), 32);
machine().scheduler().timer_set(m_screen->time_until_pos(0), timer_expired_delegate(FUNC(itech8_state::behind_the_beam_update),this), 32);
}
void itech8_state::machine_reset()
@ -661,7 +661,7 @@ void itech8_state::machine_reset()
/* set the visible area */
if (m_visarea.width() > 1)
{
machine().primary_screen->set_visible_area(m_visarea.min_x, m_visarea.max_x, m_visarea.min_y, m_visarea.max_y);
m_screen->set_visible_area(m_visarea.min_x, m_visarea.max_x, m_visarea.min_y, m_visarea.max_y);
m_visarea.set(0, 0, 0, 0);
}
}
@ -680,14 +680,14 @@ TIMER_CALLBACK_MEMBER(itech8_state::behind_the_beam_update)
int interval = param & 0xff;
/* force a partial update to the current scanline */
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
/* advance by the interval, and wrap to 0 */
scanline += interval;
if (scanline >= 256) scanline = 0;
/* set a new timer */
machine().scheduler().timer_set(machine().primary_screen->time_until_pos(scanline), timer_expired_delegate(FUNC(itech8_state::behind_the_beam_update),this), (scanline << 8) + interval);
machine().scheduler().timer_set(m_screen->time_until_pos(scanline), timer_expired_delegate(FUNC(itech8_state::behind_the_beam_update),this), (scanline << 8) + interval);
}

View File

@ -395,7 +395,7 @@ ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER(jackie_state::hopper_r)
{
if (m_hopper) return !(machine().primary_screen->frame_number()%10);
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
}

View File

@ -135,7 +135,7 @@ TIMER_CALLBACK_MEMBER(jedi_state::generate_interrupt)
scanline += 32;
if (scanline > 256)
scanline = 32;
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(scanline), scanline);
m_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
@ -156,7 +156,7 @@ void jedi_state::machine_start()
{
/* set a timer to run the interrupts */
m_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(jedi_state::generate_interrupt),this));
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(32), 32);
m_interrupt_timer->adjust(m_screen->time_until_pos(32), 32);
/* configure the banks */
membank("bank1")->configure_entries(0, 3, memregion("maincpu")->base() + 0x10000, 0x4000);

View File

@ -61,7 +61,7 @@ WRITE16_MEMBER(klax_state::interrupt_ack_w)
MACHINE_RESET_MEMBER(klax_state,klax)
{
atarigen_state::machine_reset();
scanline_timer_reset(*machine().primary_screen, 32);
scanline_timer_reset(*m_screen, 32);
}

View File

@ -670,7 +670,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(konamigx_state::konamigx_hbinterrupt)
// maybe this interrupt should only be every 30fps, or maybe there are flags to prevent the game running too fast
// the real hardware should output the display for each screen on alternate frames
// if(device->machine().primary_screen->frame_number() & 1)
// if(device->m_screen->frame_number() & 1)
if (1) // gx_syncen & 0x20)
{
gx_syncen &= ~0x20;

View File

@ -137,7 +137,7 @@ void lastfght_state::video_start()
{
int i;
for (i = 0; i < 2; i++)
machine().primary_screen->register_screen_bitmap(m_bitmap[i]);
m_screen->register_screen_bitmap(m_bitmap[i]);
save_item(NAME(m_bitmap[0]));
save_item(NAME(m_bitmap[1]));

View File

@ -432,7 +432,7 @@ WRITE16_MEMBER(littlerb_state::littlerb_vdp_w)
/* could be slightly different (timing wise, directly related to the irqs), but certainly they smoked some bad pot for this messy way ... */
UINT8 littlerb_state::sound_data_shift()
{
return ((machine().primary_screen->frame_number() % 16) == 0) ? 8 : 0;
return ((m_screen->frame_number() % 16) == 0) ? 8 : 0;
}
/* l is SFX, r is BGM (they doesn't seem to share the same data ROM) */
@ -469,7 +469,7 @@ ADDRESS_MAP_END
/* guess according to DASM code and checking the gameplay speed, could be different */
CUSTOM_INPUT_MEMBER(littlerb_state::littlerb_frame_step_r)
{
UINT32 ret = machine().primary_screen->frame_number();
UINT32 ret = m_screen->frame_number();
return (ret) & 7;
}
@ -593,8 +593,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_scanline)
void littlerb_state::video_start()
{
// machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites_back);
// machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites);
// m_screen->register_screen_bitmap(m_temp_bitmap_sprites_back);
// m_screen->register_screen_bitmap(m_temp_bitmap_sprites);
m_temp_bitmap_sprites_back = auto_bitmap_ind16_alloc(machine(),512,512);
m_temp_bitmap_sprites = auto_bitmap_ind16_alloc(machine(),512,512);

View File

@ -130,7 +130,7 @@ Notes (couriersud)
WRITE8_MEMBER(m10_state::ic8j1_output_changed)
{
LOG(("ic8j1: %d %d\n", data, machine().primary_screen->vpos()));
LOG(("ic8j1: %d %d\n", data, m_screen->vpos()));
m_maincpu->set_input_line(0, !data ? CLEAR_LINE : ASSERT_LINE);
}
@ -464,7 +464,7 @@ WRITE8_MEMBER(m10_state::m15_a100_w)
READ8_MEMBER(m10_state::m10_a700_r)
{
//LOG(("rd:%d\n",machine().primary_screen->vpos()));
//LOG(("rd:%d\n",m_screen->vpos()));
LOG(("clear\n"));
ttl74123_clear_w(m_ic8j1, space, 0, 0);
ttl74123_clear_w(m_ic8j1, space, 0, 1);
@ -473,7 +473,7 @@ READ8_MEMBER(m10_state::m10_a700_r)
READ8_MEMBER(m10_state::m11_a700_r)
{
//LOG(("rd:%d\n",machine().primary_screen->vpos()));
//LOG(("rd:%d\n",m_screen->vpos()));
//m_maincpu->set_input_line(0, CLEAR_LINE);
LOG(("clear\n"));
ttl74123_clear_w(m_ic8j1, space, 0, 0);
@ -499,12 +499,12 @@ TIMER_CALLBACK_MEMBER(m10_state::interrupt_callback)
if (param == 0)
{
m_maincpu->set_input_line(0, ASSERT_LINE);
timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 16), TIMER_INTERRUPT, 1);
timer_set(m_screen->time_until_pos(IREMM10_VBSTART + 16), TIMER_INTERRUPT, 1);
}
if (param == 1)
{
m_maincpu->set_input_line(0, ASSERT_LINE);
timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 24), TIMER_INTERRUPT, 2);
timer_set(m_screen->time_until_pos(IREMM10_VBSTART + 24), TIMER_INTERRUPT, 2);
}
if (param == -1)
m_maincpu->set_input_line(0, CLEAR_LINE);
@ -538,7 +538,7 @@ INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt)
INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt)
{
device.execute().set_input_line(0, ASSERT_LINE);
timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), TIMER_INTERRUPT, -1);
timer_set(m_screen->time_until_pos(IREMM10_VBSTART + 1, 80), TIMER_INTERRUPT, -1);
}
/*************************************

View File

@ -55,14 +55,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(m107_state::m107_scanline_interrupt)
/* raster interrupt */
if (scanline == m_raster_irq_position)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_2);
}
/* VBLANK interrupt */
else if (scanline == machine().primary_screen->visible_area().max_y + 1)
else if (scanline == m_screen->visible_area().max_y + 1)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_0);
}
}

View File

@ -128,19 +128,19 @@ MACHINE_RESET_MEMBER(m72_state,m72)
m_mcu_sample_addr = 0;
m_mcu_snd_cmd_latch = 0;
m_scanline_timer->adjust(machine().primary_screen->time_until_pos(0));
m_scanline_timer->adjust(m_screen->time_until_pos(0));
machine().scheduler().synchronize(timer_expired_delegate(FUNC(m72_state::synch_callback),this));
}
MACHINE_RESET_MEMBER(m72_state,xmultipl)
{
m_irq_base = 0x08;
m_scanline_timer->adjust(machine().primary_screen->time_until_pos(0));
m_scanline_timer->adjust(m_screen->time_until_pos(0));
}
MACHINE_RESET_MEMBER(m72_state,kengo)
{
m_scanline_timer->adjust(machine().primary_screen->time_until_pos(0));
m_scanline_timer->adjust(m_screen->time_until_pos(0));
}
TIMER_CALLBACK_MEMBER(m72_state::m72_scanline_interrupt)
@ -150,21 +150,21 @@ TIMER_CALLBACK_MEMBER(m72_state::m72_scanline_interrupt)
/* raster interrupt - visible area only? */
if (scanline < 256 && scanline == m_raster_irq_position - 128)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_base + 2);
}
/* VBLANK interrupt */
else if (scanline == 256)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_base + 0);
}
/* adjust for next scanline */
if (++scanline >= machine().primary_screen->height())
if (++scanline >= m_screen->height())
scanline = 0;
m_scanline_timer->adjust(machine().primary_screen->time_until_pos(scanline), scanline);
m_scanline_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
TIMER_CALLBACK_MEMBER(m72_state::kengo_scanline_interrupt)
@ -174,7 +174,7 @@ TIMER_CALLBACK_MEMBER(m72_state::kengo_scanline_interrupt)
/* raster interrupt - visible area only? */
if (scanline < 256 && scanline == m_raster_irq_position - 128)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
m_maincpu->set_input_line(NEC_INPUT_LINE_INTP2, ASSERT_LINE);
}
else
@ -183,16 +183,16 @@ TIMER_CALLBACK_MEMBER(m72_state::kengo_scanline_interrupt)
/* VBLANK interrupt */
if (scanline == 256)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
m_maincpu->set_input_line(NEC_INPUT_LINE_INTP0, ASSERT_LINE);
}
else
m_maincpu->set_input_line(NEC_INPUT_LINE_INTP0, CLEAR_LINE);
/* adjust for next scanline */
if (++scanline >= machine().primary_screen->height())
if (++scanline >= m_screen->height())
scanline = 0;
m_scanline_timer->adjust(machine().primary_screen->time_until_pos(scanline), scanline);
m_scanline_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
/***************************************************************************

View File

@ -231,14 +231,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(m92_state::m92_scanline_interrupt)
/* raster interrupt */
if (scanline == m_raster_irq_position)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_2);
}
/* VBLANK interrupt */
else if (scanline == machine().primary_screen->visible_area().max_y + 1)
else if (scanline == m_screen->visible_area().max_y + 1)
{
machine().primary_screen->update_partial(scanline);
m_screen->update_partial(scanline);
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_0);
}
}

View File

@ -70,7 +70,7 @@ TIMER_CALLBACK_MEMBER(magmax_state::scanline_callback)
scanline += 128;
scanline &= 255;
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(scanline), scanline);
m_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
void magmax_state::machine_start()
@ -87,7 +87,7 @@ void magmax_state::machine_start()
void magmax_state::machine_reset()
{
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(64), 64);
m_interrupt_timer->adjust(m_screen->time_until_pos(64), 64);
#if 0
{

Some files were not shown because too many files have changed in this diff Show More