primary_screen -> first_screen() (nw)

This commit is contained in:
Miodrag Milanovic 2014-03-15 13:00:23 +00:00
parent 445c89c839
commit a66aff27d6
118 changed files with 394 additions and 392 deletions

View File

@ -65,7 +65,7 @@ void iq151_grafik_device::device_start()
void iq151_grafik_device::device_reset() void iq151_grafik_device::device_reset()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
// if required adjust screen size // if required adjust screen size
if (screen->visible_area().max_x < 64*8-1) if (screen->visible_area().max_x < 64*8-1)

View File

@ -84,7 +84,7 @@ void iq151_video32_device::device_start()
void iq151_video32_device::device_reset() void iq151_video32_device::device_reset()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
// if required adjust screen size // if required adjust screen size
if (screen->visible_area().max_x < 32*8 - 1) if (screen->visible_area().max_x < 32*8 - 1)

View File

@ -83,7 +83,7 @@ void iq151_video64_device::device_start()
void iq151_video64_device::device_reset() void iq151_video64_device::device_reset()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
// if required adjust screen size // if required adjust screen size
if (screen->visible_area().max_x < 64*6 - 1) if (screen->visible_area().max_x < 64*6 - 1)

View File

@ -626,7 +626,7 @@ void nes_sc127_device::hblank_irq(int scanline, int vblank, int blanked)
if (!blanked && (m_irq_count == 0)) if (!blanked && (m_irq_count == 0))
{ {
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
machine().primary_screen->vpos(), machine().primary_screen->hpos())); machine().first_screen()->vpos(), machine().first_screen()->hpos()));
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
m_irq_enable = 0; m_irq_enable = 0;
} }

View File

@ -95,7 +95,7 @@ void nes_hosenkan_device::hblank_irq( int scanline, int vblank, int blanked )
if (m_irq_enable && !blanked && (m_irq_count == 0) && (prior_count || m_irq_clear)) if (m_irq_enable && !blanked && (m_irq_count == 0) && (prior_count || m_irq_clear))
{ {
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
machine().primary_screen->vpos(), machine().primary_screen->hpos())); machine().first_screen()->vpos(), machine().first_screen()->hpos()));
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
} }
} }

View File

@ -202,7 +202,7 @@ void nes_txrom_device::hblank_irq(int scanline, int vblank, int blanked)
if (m_irq_enable && !blanked && (m_irq_count == 0) && (prior_count || m_irq_clear /*|| !m_mmc3_alt_irq*/)) // according to blargg the latter should be present as well, but it breaks Rampart and Joe & Mac US: they probably use the alt irq! if (m_irq_enable && !blanked && (m_irq_count == 0) && (prior_count || m_irq_clear /*|| !m_mmc3_alt_irq*/)) // according to blargg the latter should be present as well, but it breaks Rampart and Joe & Mac US: they probably use the alt irq!
{ {
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
machine().primary_screen->vpos(), machine().primary_screen->hpos())); machine().first_screen()->vpos(), machine().first_screen()->hpos()));
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
} }
} }

View File

@ -985,7 +985,7 @@ void nes_mk2_device::hblank_irq( int scanline, int vblank, int blanked )
if (m_irq_enable && !blanked && (m_irq_count == 0) && (prior_count || m_irq_clear)) if (m_irq_enable && !blanked && (m_irq_count == 0) && (prior_count || m_irq_clear))
{ {
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
machine().primary_screen->vpos(), machine().primary_screen->hpos())); machine().first_screen()->vpos(), machine().first_screen()->hpos()));
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
} }
} }

View File

@ -411,7 +411,7 @@ offs_t esrip_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
int esrip_device::get_hblank() int esrip_device::get_hblank()
{ {
return machine().primary_screen->hblank(); return machine().first_screen()->hblank();
} }
/* Return the state of the LBRM line (Y-scaling related) */ /* Return the state of the LBRM line (Y-scaling related) */

View File

@ -235,7 +235,7 @@ void crosshair_init(running_machine &machine)
global.visible[player] = (CROSSHAIR_VISIBILITY_DEFAULT == CROSSHAIR_VISIBILITY_OFF) ? FALSE : TRUE; global.visible[player] = (CROSSHAIR_VISIBILITY_DEFAULT == CROSSHAIR_VISIBILITY_OFF) ? FALSE : TRUE;
/* for now, use the main screen */ /* for now, use the main screen */
global.screen[player] = machine.primary_screen; global.screen[player] = machine.first_screen();
create_bitmap(machine, player); create_bitmap(machine, player);
} }
@ -245,8 +245,8 @@ void crosshair_init(running_machine &machine)
config_register(machine, "crosshairs", config_saveload_delegate(FUNC(crosshair_load), &machine), config_saveload_delegate(FUNC(crosshair_save), &machine)); config_register(machine, "crosshairs", config_saveload_delegate(FUNC(crosshair_load), &machine), config_saveload_delegate(FUNC(crosshair_save), &machine));
/* register the animation callback */ /* register the animation callback */
if (machine.primary_screen != NULL) if (machine.first_screen() != NULL)
machine.primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(animate), &machine)); machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(animate), &machine));
} }

View File

@ -150,8 +150,8 @@ void debug_cpu_init(running_machine &machine)
global->visiblecpu = machine.firstcpu; global->visiblecpu = machine.firstcpu;
/* add callback for breaking on VBLANK */ /* add callback for breaking on VBLANK */
if (machine.primary_screen != NULL) if (machine.first_screen() != NULL)
machine.primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(on_vblank), &machine)); machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(on_vblank), &machine));
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debug_cpu_exit), &machine)); machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debug_cpu_exit), &machine));
} }

View File

@ -211,7 +211,7 @@ void debug_view_state::view_update()
curitem = curitem->m_next; curitem = curitem->m_next;
// loop over visible rows // loop over visible rows
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
debug_view_char *dest = m_viewdata; debug_view_char *dest = m_viewdata;
for (UINT32 row = 0; row < m_visible.y; row++) for (UINT32 row = 0; row < m_visible.y; row++)
{ {

View File

@ -265,9 +265,11 @@ public:
// CPU information // CPU information
cpu_device * firstcpu; // first CPU cpu_device * firstcpu; // first CPU
private:
// video-related information // video-related information
screen_device * primary_screen; // the primary screen device, or NULL if screenless screen_device * primary_screen; // the primary screen device, or NULL if screenless
public:
// debugger-related information // debugger-related information
UINT32 debug_flags; // the current debug flags UINT32 debug_flags; // the current debug flags

View File

@ -738,7 +738,7 @@ static TIMER_CALLBACK( s3c24xx_lcd_timer_exp )
{ {
device_t *device = (device_t *)ptr; device_t *device = (device_t *)ptr;
s3c24xx_t *s3c24xx = get_token( device); s3c24xx_t *s3c24xx = get_token( device);
screen_device *screen = machine.primary_screen; screen_device *screen = machine.first_screen();
UINT32 tpalen; UINT32 tpalen;
verboselog( machine, 2, "LCD timer callback\n"); verboselog( machine, 2, "LCD timer callback\n");
s3c24xx->lcd.vpos = screen->vpos(); s3c24xx->lcd.vpos = screen->vpos();
@ -782,7 +782,7 @@ static TIMER_CALLBACK( s3c24xx_lcd_timer_exp )
static void s3c24xx_video_start( device_t *device, running_machine &machine) static void s3c24xx_video_start( device_t *device, running_machine &machine)
{ {
s3c24xx_t *s3c24xx = get_token( device); s3c24xx_t *s3c24xx = get_token( device);
screen_device *screen = machine.primary_screen; screen_device *screen = machine.first_screen();
s3c24xx->lcd.bitmap[0] = auto_bitmap_rgb32_alloc(machine, screen->width(), screen->height()); s3c24xx->lcd.bitmap[0] = auto_bitmap_rgb32_alloc(machine, screen->width(), screen->height());
s3c24xx->lcd.bitmap[1] = auto_bitmap_rgb32_alloc(machine, screen->width(), screen->height()); s3c24xx->lcd.bitmap[1] = auto_bitmap_rgb32_alloc(machine, screen->width(), screen->height());
} }
@ -846,7 +846,7 @@ READ32_DEVICE_HANDLER( s3c2440_lcd_r )
case S3C24XX_LCDCON1 : case S3C24XX_LCDCON1 :
{ {
// make sure line counter is going // make sure line counter is going
UINT32 vpos = device->machine().primary_screen->vpos(); UINT32 vpos = device->machine().first_screen()->vpos();
if (vpos < s3c24xx->lcd.vpos_min) vpos = s3c24xx->lcd.vpos_min; if (vpos < s3c24xx->lcd.vpos_min) vpos = s3c24xx->lcd.vpos_min;
if (vpos > s3c24xx->lcd.vpos_max) vpos = s3c24xx->lcd.vpos_max; if (vpos > s3c24xx->lcd.vpos_max) vpos = s3c24xx->lcd.vpos_max;
data = (data & ~0xFFFC0000) | ((s3c24xx->lcd.vpos_max - vpos) << 18); data = (data & ~0xFFFC0000) | ((s3c24xx->lcd.vpos_max - vpos) << 18);
@ -854,7 +854,7 @@ READ32_DEVICE_HANDLER( s3c2440_lcd_r )
break; break;
case S3C24XX_LCDCON5 : case S3C24XX_LCDCON5 :
{ {
UINT32 vpos = device->machine().primary_screen->vpos(); UINT32 vpos = device->machine().first_screen()->vpos();
data = data & ~0x00018000; data = data & ~0x00018000;
if (vpos < s3c24xx->lcd.vpos_min) data = data | 0x00000000; if (vpos < s3c24xx->lcd.vpos_min) data = data | 0x00000000;
if (vpos > s3c24xx->lcd.vpos_max) data = data | 0x00018000; if (vpos > s3c24xx->lcd.vpos_max) data = data | 0x00018000;
@ -869,7 +869,7 @@ READ32_DEVICE_HANDLER( s3c2440_lcd_r )
static int s3c24xx_lcd_configure_tft( device_t *device) static int s3c24xx_lcd_configure_tft( device_t *device)
{ {
s3c24xx_t *s3c24xx = get_token( device); s3c24xx_t *s3c24xx = get_token( device);
screen_device *screen = device->machine().primary_screen; screen_device *screen = device->machine().first_screen();
UINT32 vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk; UINT32 vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk;
double framerate, vclk; double framerate, vclk;
UINT32 width, height; UINT32 width, height;
@ -910,7 +910,7 @@ static int s3c24xx_lcd_configure_tft( device_t *device)
static int s3c24xx_lcd_configure_stn( device_t *device) static int s3c24xx_lcd_configure_stn( device_t *device)
{ {
s3c24xx_t *s3c24xx = get_token( device); s3c24xx_t *s3c24xx = get_token( device);
screen_device *screen = device->machine().primary_screen; screen_device *screen = device->machine().first_screen();
UINT32 pnrmode, bppmode, clkval, lineval, wdly, hozval, lineblank, wlh, hclk; UINT32 pnrmode, bppmode, clkval, lineval, wdly, hozval, lineblank, wlh, hclk;
double vclk, framerate; double vclk, framerate;
UINT32 width, height; UINT32 width, height;
@ -973,7 +973,7 @@ static int s3c24xx_lcd_configure( device_t *device)
static void s3c24xx_lcd_start( device_t *device) static void s3c24xx_lcd_start( device_t *device)
{ {
s3c24xx_t *s3c24xx = get_token( device); s3c24xx_t *s3c24xx = get_token( device);
screen_device *screen = device->machine().primary_screen; screen_device *screen = device->machine().first_screen();
verboselog( device->machine(), 1, "LCD start\n"); verboselog( device->machine(), 1, "LCD start\n");
if (s3c24xx_lcd_configure( device)) if (s3c24xx_lcd_configure( device))
{ {

View File

@ -209,7 +209,7 @@ static TIMER_CALLBACK( smpc_slave_enable )
state->m_smpc.OREG[31] = param + 0x02; //read-back for last command issued state->m_smpc.OREG[31] = param + 0x02; //read-back for last command issued
state->m_smpc.SF = 0x00; //clear hand-shake flag state->m_smpc.SF = 0x00; //clear hand-shake flag
state->m_smpc.slave_on = param; state->m_smpc.slave_on = param;
// printf("%d %d\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); // printf("%d %d\n",machine.first_screen()->hpos(),machine.first_screen()->vpos());
} }
static TIMER_CALLBACK( smpc_sound_enable ) static TIMER_CALLBACK( smpc_sound_enable )
@ -254,7 +254,7 @@ static TIMER_CALLBACK( smpc_change_clock )
saturn_state *state = machine.driver_data<saturn_state>(); saturn_state *state = machine.driver_data<saturn_state>();
UINT32 xtal; UINT32 xtal;
if(LOG_SMPC) printf ("Clock change execute at (%d %d)\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); if(LOG_SMPC) printf ("Clock change execute at (%d %d)\n",machine.first_screen()->hpos(),machine.first_screen()->vpos());
xtal = param ? MASTER_CLOCK_320 : MASTER_CLOCK_352; xtal = param ? MASTER_CLOCK_320 : MASTER_CLOCK_352;
@ -525,7 +525,7 @@ static TIMER_CALLBACK( intback_peripheral )
/* doesn't work? */ /* doesn't work? */
//pad_num = state->m_smpc.intback_stage - 1; //pad_num = state->m_smpc.intback_stage - 1;
if(LOG_PAD_CMD) printf("%d %d %d\n",state->m_smpc.intback_stage - 1,machine.primary_screen->vpos(),(int)machine.primary_screen->frame_number()); if(LOG_PAD_CMD) printf("%d %d %d\n",state->m_smpc.intback_stage - 1,machine.first_screen()->vpos(),(int)machine.first_screen()->frame_number());
offset = 0; offset = 0;
@ -660,7 +660,7 @@ static TIMER_CALLBACK( smpc_nmi_set )
{ {
saturn_state *state = machine.driver_data<saturn_state>(); saturn_state *state = machine.driver_data<saturn_state>();
// printf("%d %d\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); // printf("%d %d\n",machine.first_screen()->hpos(),machine.first_screen()->vpos());
state->m_NMI_reset = param; state->m_NMI_reset = param;
/* put issued command in OREG31 */ /* put issued command in OREG31 */
state->m_smpc.OREG[31] = 0x19 + param; state->m_smpc.OREG[31] = 0x19 + param;
@ -695,7 +695,7 @@ static void smpc_comreg_exec(address_space &space, UINT8 data, UINT8 is_stv)
//case 0x01: Master OFF? //case 0x01: Master OFF?
case 0x02: case 0x02:
case 0x03: case 0x03:
if(LOG_SMPC) printf ("SMPC: Slave %s %d %d\n",(data & 1) ? "off" : "on",space.machine().primary_screen->hpos(),space.machine().primary_screen->vpos()); if(LOG_SMPC) printf ("SMPC: Slave %s %d %d\n",(data & 1) ? "off" : "on",space.machine().first_screen()->hpos(),space.machine().first_screen()->vpos());
space.machine().scheduler().timer_set(attotime::from_usec(15), FUNC(smpc_slave_enable),data & 1); space.machine().scheduler().timer_set(attotime::from_usec(15), FUNC(smpc_slave_enable),data & 1);
break; break;
case 0x06: case 0x06:
@ -717,7 +717,7 @@ static void smpc_comreg_exec(address_space &space, UINT8 data, UINT8 is_stv)
break; break;
case 0x0e: case 0x0e:
case 0x0f: case 0x0f:
if(LOG_SMPC) printf ("SMPC: Change Clock to %s (%d %d)\n",data & 1 ? "320" : "352",space.machine().primary_screen->hpos(),space.machine().primary_screen->vpos()); if(LOG_SMPC) printf ("SMPC: Change Clock to %s (%d %d)\n",data & 1 ? "320" : "352",space.machine().first_screen()->hpos(),space.machine().first_screen()->vpos());
/* on ST-V timing of this is pretty fussy, you get 2 credits at start-up otherwise /* on ST-V timing of this is pretty fussy, you get 2 credits at start-up otherwise
My current theory is that SMPC first stops all CPUs until it executes the whole snippet for this, My current theory is that SMPC first stops all CPUs until it executes the whole snippet for this,
@ -729,14 +729,14 @@ static void smpc_comreg_exec(address_space &space, UINT8 data, UINT8 is_stv)
state->m_slave->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); state->m_slave->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
state->m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); state->m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
space.machine().scheduler().timer_set(space.machine().primary_screen->time_until_pos(state->get_vblank_start_position()*state->get_ystep_count(), 0), FUNC(smpc_change_clock),data & 1); space.machine().scheduler().timer_set(space.machine().first_screen()->time_until_pos(state->get_vblank_start_position()*state->get_ystep_count(), 0), FUNC(smpc_change_clock),data & 1);
break; break;
/*"Interrupt Back"*/ /*"Interrupt Back"*/
case 0x10: case 0x10:
if(0) if(0)
{ {
saturn_state *state = space.machine().driver_data<saturn_state>(); saturn_state *state = space.machine().driver_data<saturn_state>();
printf ("SMPC: Status Acquire %02x %02x %02x %d\n",state->m_smpc.IREG[0],state->m_smpc.IREG[1],state->m_smpc.IREG[2],space.machine().primary_screen->vpos()); printf ("SMPC: Status Acquire %02x %02x %02x %d\n",state->m_smpc.IREG[0],state->m_smpc.IREG[1],state->m_smpc.IREG[2],space.machine().first_screen()->vpos());
} }
int timing; int timing;
@ -764,7 +764,7 @@ static void smpc_comreg_exec(address_space &space, UINT8 data, UINT8 is_stv)
} }
else else
{ {
if(LOG_PAD_CMD) printf("INTBACK %02x %02x %d %d\n",state->m_smpc.IREG[0],state->m_smpc.IREG[1],space.machine().primary_screen->vpos(),(int)space.machine().primary_screen->frame_number()); if(LOG_PAD_CMD) printf("INTBACK %02x %02x %d %d\n",state->m_smpc.IREG[0],state->m_smpc.IREG[1],space.machine().first_screen()->vpos(),(int)space.machine().first_screen()->frame_number());
space.machine().scheduler().timer_set(attotime::from_usec(timing), FUNC(saturn_smpc_intback),0); //TODO: is variable time correct? space.machine().scheduler().timer_set(attotime::from_usec(timing), FUNC(saturn_smpc_intback),0); //TODO: is variable time correct?
} }
break; break;
@ -785,7 +785,7 @@ static void smpc_comreg_exec(address_space &space, UINT8 data, UINT8 is_stv)
case 0x19: case 0x19:
case 0x1a: case 0x1a:
/* TODO: timing */ /* TODO: timing */
if(LOG_SMPC) printf ("SMPC: NMI %sable %d %d\n",data & 1 ? "Dis" : "En",space.machine().primary_screen->hpos(),space.machine().primary_screen->vpos()); if(LOG_SMPC) printf ("SMPC: NMI %sable %d %d\n",data & 1 ? "Dis" : "En",space.machine().first_screen()->hpos(),space.machine().first_screen()->vpos());
space.machine().scheduler().timer_set(attotime::from_usec(100), FUNC(smpc_nmi_set),data & 1); space.machine().scheduler().timer_set(attotime::from_usec(100), FUNC(smpc_nmi_set),data & 1);
break; break;
default: default:
@ -1001,7 +1001,7 @@ READ8_MEMBER( saturn_state::saturn_SMPC_r )
if (offset == 0x63) if (offset == 0x63)
{ {
//printf("SF %d %d\n",space.machine().primary_screen->hpos(),space.machine().primary_screen->vpos()); //printf("SF %d %d\n",space.machine().first_screen()->hpos(),space.machine().first_screen()->vpos());
return_data = m_smpc.SF; return_data = m_smpc.SF;
} }

View File

@ -808,7 +808,7 @@ void screen_device::vblank_begin()
m_vblank_end_time = m_vblank_start_time + attotime(0, m_vblank_period); m_vblank_end_time = m_vblank_start_time + attotime(0, m_vblank_period);
// if this is the primary screen and we need to update now // if this is the primary screen and we need to update now
if (this == machine().primary_screen && !(m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK)) if (this == machine().first_screen() && !(m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK))
machine().video().frame_update(); machine().video().frame_update();
// call the screen specific callbacks // call the screen specific callbacks
@ -842,7 +842,7 @@ void screen_device::vblank_end()
m_screen_vblank(*this, false); m_screen_vblank(*this, false);
// if this is the primary screen and we need to update now // if this is the primary screen and we need to update now
if (this == machine().primary_screen && (m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK)) if (this == machine().first_screen() && (m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK))
machine().video().frame_update(); machine().video().frame_update();
// increment the frame number counter // increment the frame number counter

View File

@ -161,9 +161,9 @@ void nesapu_device::device_start()
int i; int i;
/* Initialize global variables */ /* Initialize global variables */
m_samps_per_sync = rate / ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds); m_samps_per_sync = rate / ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds);
m_buffer_size = m_samps_per_sync; m_buffer_size = m_samps_per_sync;
m_real_rate = m_samps_per_sync * ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds); m_real_rate = m_samps_per_sync * ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds);
m_apu_incsize = (float) (clock() / (float) m_real_rate); m_apu_incsize = (float) (clock() / (float) m_real_rate);
/* Use initializer calls */ /* Use initializer calls */

View File

@ -2017,8 +2017,8 @@ static INT32 slider_refresh(running_machine &machine, void *arg, astring *string
screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001)); screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001));
} }
if (string != NULL) if (string != NULL)
string->printf("%.3ffps", ATTOSECONDS_TO_HZ(machine.primary_screen->frame_period().attoseconds)); string->printf("%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds));
refresh = ATTOSECONDS_TO_HZ(machine.primary_screen->frame_period().attoseconds); refresh = ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds);
return floor((refresh - defrefresh) * 1000.0f + 0.5f); return floor((refresh - defrefresh) * 1000.0f + 0.5f);
} }

View File

@ -115,7 +115,7 @@ video_manager::video_manager(running_machine &machine)
// create a render target for snapshots // create a render target for snapshots
const char *viewname = machine.options().snap_view(); const char *viewname = machine.options().snap_view();
m_snap_native = (machine.primary_screen != NULL && (viewname[0] == 0 || strcmp(viewname, "native") == 0)); m_snap_native = (machine.first_screen() != NULL && (viewname[0] == 0 || strcmp(viewname, "native") == 0));
// the native target is hard-coded to our internal layout and has all options disabled // the native target is hard-coded to our internal layout and has all options disabled
if (m_snap_native) if (m_snap_native)
@ -152,7 +152,7 @@ video_manager::video_manager(running_machine &machine)
begin_recording(filename, MF_AVI); begin_recording(filename, MF_AVI);
// if no screens, create a periodic timer to drive updates // if no screens, create a periodic timer to drive updates
if (machine.primary_screen == NULL) if (machine.first_screen() == NULL)
{ {
m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this)); m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this));
m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD); m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD);
@ -240,8 +240,8 @@ void video_manager::frame_update(bool debug)
if (phase == MACHINE_PHASE_RUNNING) if (phase == MACHINE_PHASE_RUNNING)
{ {
// reset partial updates if we're paused or if the debugger is active // reset partial updates if we're paused or if the debugger is active
if (machine().primary_screen != NULL && (machine().paused() || debug || debugger_within_instruction_hook(machine()))) if (machine().first_screen() != NULL && (machine().paused() || debug || debugger_within_instruction_hook(machine())))
machine().primary_screen->reset_partial_updates(); machine().first_screen()->reset_partial_updates();
} }
} }
@ -375,7 +375,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
// build up information about this new movie // build up information about this new movie
avi_movie_info info; avi_movie_info info;
info.video_format = 0; info.video_format = 0;
info.video_timescale = 1000 * ((machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE); info.video_timescale = 1000 * ((machine().first_screen() != NULL) ? ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE);
info.video_sampletime = 1000; info.video_sampletime = 1000;
info.video_numsamples = 0; info.video_numsamples = 0;
info.video_width = m_snap_bitmap.width(); info.video_width = m_snap_bitmap.width();
@ -431,7 +431,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
if (filerr == FILERR_NONE) if (filerr == FILERR_NONE)
{ {
// start the capture // start the capture
int rate = (machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE; int rate = (machine().first_screen() != NULL) ? ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE;
png_error pngerr = mng_capture_start(*m_mngfile, m_snap_bitmap, rate); png_error pngerr = mng_capture_start(*m_mngfile, m_snap_bitmap, rate);
if (pngerr != PNGERR_NONE) if (pngerr != PNGERR_NONE)
return end_recording(); return end_recording();
@ -1003,13 +1003,13 @@ void video_manager::recompute_speed(attotime emutime)
// if we're past the "time-to-execute" requested, signal an exit // if we're past the "time-to-execute" requested, signal an exit
if (m_seconds_to_run != 0 && emutime.seconds >= m_seconds_to_run) if (m_seconds_to_run != 0 && emutime.seconds >= m_seconds_to_run)
{ {
if (machine().primary_screen != NULL) if (machine().first_screen() != NULL)
{ {
// create a final screenshot // create a final screenshot
emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
file_error filerr = file.open(machine().basename(), PATH_SEPARATOR "final.png"); file_error filerr = file.open(machine().basename(), PATH_SEPARATOR "final.png");
if (filerr == FILERR_NONE) if (filerr == FILERR_NONE)
save_snapshot(machine().primary_screen, file); save_snapshot(machine().first_screen(), file);
} }
// schedule our demise // schedule our demise
@ -1228,8 +1228,8 @@ void video_manager::record_frame()
} }
// write the next frame // write the next frame
const rgb_t *palette = (machine().primary_screen->palette() != NULL) ? machine().primary_screen->palette()->palette()->entry_list_adjusted() : NULL; const rgb_t *palette = (machine().first_screen()->palette() != NULL) ? machine().first_screen()->palette()->palette()->entry_list_adjusted() : NULL;
png_error error = mng_capture_frame(*m_mngfile, &pnginfo, m_snap_bitmap, machine().primary_screen->palette()->entries(), palette); png_error error = mng_capture_frame(*m_mngfile, &pnginfo, m_snap_bitmap, machine().first_screen()->palette()->entries(), palette);
png_free(&pnginfo); png_free(&pnginfo);
if (error != PNGERR_NONE) if (error != PNGERR_NONE)
{ {

View File

@ -1557,7 +1557,7 @@ READ16_MEMBER( hd63484_device::data_r )
int res; int res;
if (m_regno == 0x80) if (m_regno == 0x80)
res = machine().primary_screen->vpos(); res = machine().first_screen()->vpos();
else if (m_regno == 0) else if (m_regno == 0)
{ {
#if LOG_COMMANDS #if LOG_COMMANDS

View File

@ -376,7 +376,7 @@ inline void huc6270_device::next_horz_state()
{ {
case HUC6270_HDS: case HUC6270_HDS:
m_bxr_latched = m_bxr; m_bxr_latched = m_bxr;
//if (LOG) printf("latched bxr vpos=%d, hpos=%d\n", video_screen_get_vpos(device->machine->primary_screen), video_screen_get_hpos(device->machine->primary_screen)); //if (LOG) printf("latched bxr vpos=%d, hpos=%d\n", video_screen_get_vpos(device->machine->first_screen()), video_screen_get_hpos(device->machine->first_screen()));
m_horz_state = HUC6270_HDW; m_horz_state = HUC6270_HDW;
m_horz_to_go = ( m_hdr & 0x7F ) + 1; m_horz_to_go = ( m_hdr & 0x7F ) + 1;
{ {
@ -656,18 +656,18 @@ WRITE8_MEMBER( huc6270_device::write )
// m_status |= HUC6270_RR; // m_status |= HUC6270_RR;
// m_irq_changed( ASSERT_LINE ); // m_irq_changed( ASSERT_LINE );
// } // }
//if (LOG) printf("%04x: RCR (%03x) written at %d,%d\n", activecpu_get_pc(), huc6270->m_rcr, video_screen_get_vpos(device->machine->primary_screen), video_screen_get_hpos(device->machine->primary_screen) ); //if (LOG) printf("%04x: RCR (%03x) written at %d,%d\n", activecpu_get_pc(), huc6270->m_rcr, video_screen_get_vpos(device->machine->first_screen()), video_screen_get_hpos(device->machine->first_screen()) );
break; break;
case BXR: /* background x-scroll register LSB */ case BXR: /* background x-scroll register LSB */
m_bxr = ( m_bxr & 0x0300 ) | data; m_bxr = ( m_bxr & 0x0300 ) | data;
//if (LOG) printf("*********************** BXR written %d at %d,%d\n", m_bxr, video_screen_get_vpos(device->machine->primary_screen), video_screen_get_hpos(device->machine->primary_screen) ); //if (LOG) printf("*********************** BXR written %d at %d,%d\n", m_bxr, video_screen_get_vpos(device->machine->first_screen()), video_screen_get_hpos(device->machine->first_screen()) );
break; break;
case BYR: /* background y-scroll register LSB */ case BYR: /* background y-scroll register LSB */
m_byr = ( m_byr & 0x0100 ) | data; m_byr = ( m_byr & 0x0100 ) | data;
m_byr_latched = m_byr; m_byr_latched = m_byr;
//if (LOG) printf("******************** BYR written %d at %d,%d\n", huc6270->m_byr, video_screen_get_vpos(device->machine->primary_screen), video_screen_get_hpos(device->machine->primary_screen) ); //if (LOG) printf("******************** BYR written %d at %d,%d\n", huc6270->m_byr, video_screen_get_vpos(device->machine->first_screen()), video_screen_get_hpos(device->machine->first_screen()) );
break; break;
case MWR: /* memory width register LSB */ case MWR: /* memory width register LSB */

View File

@ -208,7 +208,7 @@ mach8_device::mach8_device(const machine_config &mconfig, const char *tag, devic
TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb) TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb)
{ {
vga.crtc.start_addr = vga.crtc.start_addr_latch; vga.crtc.start_addr = vga.crtc.start_addr_latch;
m_vblank_timer->adjust( machine().primary_screen->time_until_pos(vga.crtc.vert_blank_start) ); m_vblank_timer->adjust( machine().first_screen()->time_until_pos(vga.crtc.vert_blank_start) );
} }
void vga_device::device_start() void vga_device::device_start()
@ -347,7 +347,7 @@ void vga_device::vga_vh_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
pen_t pen; pen_t pen;
if(vga.crtc.cursor_enable) if(vga.crtc.cursor_enable)
vga.cursor.visible = machine().primary_screen->frame_number() & 0x10; vga.cursor.visible = machine().first_screen()->frame_number() & 0x10;
else else
vga.cursor.visible = 0; vga.cursor.visible = 0;
@ -360,7 +360,7 @@ void vga_device::vga_vh_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
attr = vga.memory[(pos<<1) + 1]; attr = vga.memory[(pos<<1) + 1];
font_base = 0x20000+(ch<<5); font_base = 0x20000+(ch<<5);
font_base += ((attr & 8) ? vga.sequencer.char_sel.A : vga.sequencer.char_sel.B)*0x2000; font_base += ((attr & 8) ? vga.sequencer.char_sel.A : vga.sequencer.char_sel.B)*0x2000;
blink_en = (vga.attribute.data[0x10]&8&&machine().primary_screen->frame_number() & 0x20) ? attr & 0x80 : 0; blink_en = (vga.attribute.data[0x10]&8&&machine().first_screen()->frame_number() & 0x20) ? attr & 0x80 : 0;
fore_col = attr & 0xf; fore_col = attr & 0xf;
back_col = (attr & 0x70) >> 4; back_col = (attr & 0x70) >> 4;
@ -378,7 +378,7 @@ void vga_device::vga_vh_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
else else
pen = vga.pens[back_col]; pen = vga.pens[back_col];
if(!machine().primary_screen->visible_area().contains(column*width+w, line+h)) if(!machine().first_screen()->visible_area().contains(column*width+w, line+h))
continue; continue;
bitmapline[column*width+w] = pen; bitmapline[column*width+w] = pen;
@ -391,7 +391,7 @@ void vga_device::vga_vh_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
else else
pen = vga.pens[back_col]; pen = vga.pens[back_col];
if(!machine().primary_screen->visible_area().contains(column*width+w, line+h)) if(!machine().first_screen()->visible_area().contains(column*width+w, line+h))
continue; continue;
bitmapline[column*width+w] = pen; bitmapline[column*width+w] = pen;
} }
@ -402,7 +402,7 @@ void vga_device::vga_vh_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
(h<=vga.crtc.cursor_scan_end)&&(h<height)&&(line+h<TEXT_LINES); (h<=vga.crtc.cursor_scan_end)&&(h<height)&&(line+h<TEXT_LINES);
h++) h++)
{ {
if(!machine().primary_screen->visible_area().contains(column*width, line+h)) if(!machine().first_screen()->visible_area().contains(column*width, line+h))
continue; continue;
bitmap.plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]); bitmap.plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]);
} }
@ -447,7 +447,7 @@ void vga_device::vga_vh_ega(bitmap_rgb32 &bitmap, const rectangle &cliprect)
data[2]>>=1; data[2]>>=1;
data[3]>>=1; data[3]>>=1;
if(!machine().primary_screen->visible_area().contains(c+i-pel_shift, line + yi)) if(!machine().first_screen()->visible_area().contains(c+i-pel_shift, line + yi))
continue; continue;
bitmapline[c+i-pel_shift] = pen; bitmapline[c+i-pel_shift] = pen;
} }
@ -491,7 +491,7 @@ void vga_device::vga_vh_vga(bitmap_rgb32 &bitmap, const rectangle &cliprect)
for(xi=0;xi<8;xi++) for(xi=0;xi<8;xi++)
{ {
if(!machine().primary_screen->visible_area().contains(c+xi-(pel_shift), line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi-(pel_shift), line + yi))
continue; continue;
bitmapline[c+xi-(pel_shift)] = m_palette->pen(vga.memory[(pos & 0xffff)+((xi >> 1)*0x10000)]); bitmapline[c+xi-(pel_shift)] = m_palette->pen(vga.memory[(pos & 0xffff)+((xi >> 1)*0x10000)]);
} }
@ -518,7 +518,7 @@ void vga_device::vga_vh_vga(bitmap_rgb32 &bitmap, const rectangle &cliprect)
for(xi=0;xi<0x10;xi++) for(xi=0;xi<0x10;xi++)
{ {
if(!machine().primary_screen->visible_area().contains(c+xi-(pel_shift), line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi-(pel_shift), line + yi))
continue; continue;
bitmapline[c+xi-pel_shift] = m_palette->pen(vga.memory[(pos+(xi >> 1)) & 0xffff]); bitmapline[c+xi-pel_shift] = m_palette->pen(vga.memory[(pos+(xi >> 1)) & 0xffff]);
} }
@ -552,7 +552,7 @@ void vga_device::vga_vh_cga(bitmap_rgb32 &bitmap, const rectangle &cliprect)
for(xi=0;xi<4;xi++) for(xi=0;xi<4;xi++)
{ {
pen = vga.pens[(vga.memory[addr] >> (6-xi*2)) & 3]; pen = vga.pens[(vga.memory[addr] >> (6-xi*2)) & 3];
if(!machine().primary_screen->visible_area().contains(x+xi, y * height + yi)) if(!machine().first_screen()->visible_area().contains(x+xi, y * height + yi))
continue; continue;
bitmapline[x+xi] = pen; bitmapline[x+xi] = pen;
} }
@ -587,7 +587,7 @@ void vga_device::vga_vh_mono(bitmap_rgb32 &bitmap, const rectangle &cliprect)
for(xi=0;xi<8;xi++) for(xi=0;xi<8;xi++)
{ {
pen = vga.pens[(vga.memory[addr] >> (7-xi)) & 1]; pen = vga.pens[(vga.memory[addr] >> (7-xi)) & 1];
if(!machine().primary_screen->visible_area().contains(x+xi, y * height + yi)) if(!machine().first_screen()->visible_area().contains(x+xi, y * height + yi))
continue; continue;
bitmapline[x+xi] = pen; bitmapline[x+xi] = pen;
} }
@ -640,7 +640,7 @@ void svga_device::svga_vh_rgb8(bitmap_rgb32 &bitmap, const rectangle &cliprect)
for(xi=0;xi<8;xi++) for(xi=0;xi<8;xi++)
{ {
if(!machine().primary_screen->visible_area().contains(c+xi, line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi, line + yi))
continue; continue;
bitmapline[c+xi] = m_palette->pen(vga.memory[(pos+(xi))]); bitmapline[c+xi] = m_palette->pen(vga.memory[(pos+(xi))]);
} }
@ -679,7 +679,7 @@ void svga_device::svga_vh_rgb15(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
int r,g,b; int r,g,b;
if(!machine().primary_screen->visible_area().contains(c+xi, line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi, line + yi))
continue; continue;
r = (MV(pos+xm)&0x7c00)>>10; r = (MV(pos+xm)&0x7c00)>>10;
@ -723,7 +723,7 @@ void svga_device::svga_vh_rgb16(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
int r,g,b; int r,g,b;
if(!machine().primary_screen->visible_area().contains(c+xi, line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi, line + yi))
continue; continue;
r = (MV(pos+xm)&0xf800)>>11; r = (MV(pos+xm)&0xf800)>>11;
@ -767,7 +767,7 @@ void svga_device::svga_vh_rgb24(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
int r,g,b; int r,g,b;
if(!machine().primary_screen->visible_area().contains(c+xi, line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi, line + yi))
continue; continue;
r = (MD(pos+xm)&0xff0000)>>16; r = (MD(pos+xm)&0xff0000)>>16;
@ -808,7 +808,7 @@ void svga_device::svga_vh_rgb32(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
int r,g,b; int r,g,b;
if(!machine().primary_screen->visible_area().contains(c+xi, line + yi)) if(!machine().first_screen()->visible_area().contains(c+xi, line + yi))
continue; continue;
r = (MD(pos+xm)&0xff0000)>>16; r = (MD(pos+xm)&0xff0000)>>16;
@ -1317,9 +1317,9 @@ void vga_device::recompute_params_clock(int divisor, int xtal)
pixel_clock = xtal / (((vga.sequencer.data[1]&8) >> 3) + 1); pixel_clock = xtal / (((vga.sequencer.data[1]&8) >> 3) + 1);
refresh = HZ_TO_ATTOSECONDS(pixel_clock) * (hblank_period) * vblank_period; refresh = HZ_TO_ATTOSECONDS(pixel_clock) * (hblank_period) * vblank_period;
machine().primary_screen->configure((hblank_period), (vblank_period), visarea, refresh ); machine().first_screen()->configure((hblank_period), (vblank_period), visarea, refresh );
//popmessage("%d %d\n",vga.crtc.horz_total * 8,vga.crtc.vert_total); //popmessage("%d %d\n",vga.crtc.horz_total * 8,vga.crtc.vert_total);
m_vblank_timer->adjust( machine().primary_screen->time_until_pos(vga.crtc.vert_blank_start) ); m_vblank_timer->adjust( machine().first_screen()->time_until_pos(vga.crtc.vert_blank_start) );
} }
void vga_device::recompute_params() void vga_device::recompute_params()
@ -1506,7 +1506,7 @@ UINT8 vga_device::vga_vblank()
res = 0; res = 0;
vblank_start = vga.crtc.vert_blank_start; vblank_start = vga.crtc.vert_blank_start;
vblank_end = vga.crtc.vert_blank_start + vga.crtc.vert_blank_end; vblank_end = vga.crtc.vert_blank_start + vga.crtc.vert_blank_end;
vpos = machine().primary_screen->vpos(); vpos = machine().first_screen()->vpos();
/* check if we are under vblank period */ /* check if we are under vblank period */
if(vblank_end > vga.crtc.vert_total) if(vblank_end > vga.crtc.vert_total)
@ -1542,8 +1542,8 @@ READ8_MEMBER(vga_device::vga_crtc_r)
vga.attribute.state = 0; vga.attribute.state = 0;
data = 0; data = 0;
hsync = space.machine().primary_screen->hblank() & 1; hsync = space.machine().first_screen()->hblank() & 1;
vsync = vga_vblank(); //space.machine().primary_screen->vblank() & 1; vsync = vga_vblank(); //space.machine().first_screen()->vblank() & 1;
data |= (hsync | vsync) & 1; // DD - display disable register data |= (hsync | vsync) & 1; // DD - display disable register
data |= (vsync & 1) << 3; // VRetrace register data |= (vsync & 1) << 3; // VRetrace register
@ -1594,10 +1594,10 @@ WRITE8_MEMBER(vga_device::vga_crtc_w)
} }
crtc_reg_write(vga.crtc.index,data); crtc_reg_write(vga.crtc.index,data);
//space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); //space.machine().first_screen()->update_partial(space.machine().first_screen()->vpos());
#if 0 #if 0
if((vga.crtc.index & 0xfe) != 0x0e) if((vga.crtc.index & 0xfe) != 0x0e)
printf("%02x %02x %d\n",vga.crtc.index,data,space.machine().primary_screen->vpos()); printf("%02x %02x %d\n",vga.crtc.index,data,space.machine().first_screen()->vpos());
#endif #endif
break; break;
@ -2530,7 +2530,7 @@ WRITE8_MEMBER(tseng_vga_device::port_03d0_w)
vga.crtc.data[vga.crtc.index] = data; vga.crtc.data[vga.crtc.index] = data;
tseng_crtc_reg_write(vga.crtc.index,data); tseng_crtc_reg_write(vga.crtc.index,data);
//if((vga.crtc.index & 0xfe) != 0x0e) //if((vga.crtc.index & 0xfe) != 0x0e)
// printf("%02x %02x %d\n",vga.crtc.index,data,space.machine().primary_screen->vpos()); // printf("%02x %02x %d\n",vga.crtc.index,data,space.machine().first_screen()->vpos());
break; break;
case 8: case 8:
et4k.reg_3d8 = data; et4k.reg_3d8 = data;

View File

@ -114,7 +114,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level,
void psxgpu_device::DebugMeshInit( void ) void psxgpu_device::DebugMeshInit( void )
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
int width = screen->width(); int width = screen->width();
int height = screen->height(); int height = screen->height();
@ -131,7 +131,7 @@ void psxgpu_device::DebugMesh( int n_coordx, int n_coordy )
{ {
int n_coord; int n_coord;
int n_colour; int n_colour;
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
int width = screen->width(); int width = screen->width();
int height = screen->height(); int height = screen->height();
@ -330,7 +330,7 @@ int psxgpu_device::DebugTextureDisplay( bitmap_ind16 &bitmap )
if( m_debug.b_texture ) if( m_debug.b_texture )
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
int width = screen->width(); int width = screen->width();
int height = screen->height(); int height = screen->height();
@ -442,7 +442,7 @@ void psxgpu_device::updatevisiblearea()
#endif #endif
visarea.set(0, n_screenwidth - 1, 0, n_screenheight - 1); visarea.set(0, n_screenwidth - 1, 0, n_screenheight - 1);
machine().primary_screen->configure(n_screenwidth, n_screenheight, visarea, HZ_TO_ATTOSECONDS(refresh)); machine().first_screen()->configure(n_screenwidth, n_screenheight, visarea, HZ_TO_ATTOSECONDS(refresh));
} }
void psxgpu_device::psx_gpu_init( int n_gputype ) void psxgpu_device::psx_gpu_init( int n_gputype )

View File

@ -5940,8 +5940,8 @@ int saturn_state::get_pixel_clock( void )
/* TODO: hblank position and hblank firing doesn't really match HW behaviour. */ /* TODO: hblank position and hblank firing doesn't really match HW behaviour. */
UINT8 saturn_state::get_hblank( void ) UINT8 saturn_state::get_hblank( void )
{ {
const rectangle &visarea = machine().primary_screen->visible_area(); const rectangle &visarea = machine().first_screen()->visible_area();
int cur_h = machine().primary_screen->hpos(); int cur_h = machine().first_screen()->hpos();
if (cur_h > visarea.max_x) //TODO if (cur_h > visarea.max_x) //TODO
return 1; return 1;
@ -5952,7 +5952,7 @@ UINT8 saturn_state::get_hblank( void )
UINT8 saturn_state::get_vblank( void ) UINT8 saturn_state::get_vblank( void )
{ {
int cur_v,vblank; int cur_v,vblank;
cur_v = machine().primary_screen->vpos(); cur_v = machine().first_screen()->vpos();
vblank = get_vblank_start_position() * get_ystep_count(); vblank = get_vblank_start_position() * get_ystep_count();
@ -5970,7 +5970,7 @@ UINT8 saturn_state::get_odd_bit( void )
if(STV_VDP2_LSMD == 0) // same for non-interlace mode if(STV_VDP2_LSMD == 0) // same for non-interlace mode
return 1; return 1;
return machine().primary_screen->frame_number() & 1; return machine().first_screen()->frame_number() & 1;
} }
int saturn_state::get_vblank_start_position( void ) int saturn_state::get_vblank_start_position( void )
@ -5988,7 +5988,7 @@ int saturn_state::get_vblank_start_position( void )
int saturn_state::get_ystep_count( void ) int saturn_state::get_ystep_count( void )
{ {
int max_y = machine().primary_screen->height(); int max_y = machine().first_screen()->height();
int y_step; int y_step;
y_step = 2; y_step = 2;
@ -6004,7 +6004,7 @@ int saturn_state::get_hcounter( void )
{ {
int hcount; int hcount;
hcount = machine().primary_screen->hpos(); hcount = machine().first_screen()->hpos();
switch(STV_VDP2_HRES & 6) switch(STV_VDP2_HRES & 6)
{ {
@ -6035,7 +6035,7 @@ int saturn_state::get_vcounter( void )
{ {
int vcount; int vcount;
vcount = machine().primary_screen->vpos(); vcount = machine().first_screen()->vpos();
/* Exclusive Monitor */ /* Exclusive Monitor */
if(STV_VDP2_HRES & 4) if(STV_VDP2_HRES & 4)
@ -6043,7 +6043,7 @@ int saturn_state::get_vcounter( void )
/* Double Density Interlace */ /* Double Density Interlace */
if((STV_VDP2_LSMD & 3) == 3) if((STV_VDP2_LSMD & 3) == 3)
return (vcount & ~1) | (machine().primary_screen->frame_number() & 1); return (vcount & ~1) | (machine().first_screen()->frame_number() & 1);
/* docs says << 1, but according to HW tests it's a typo. */ /* docs says << 1, but according to HW tests it's a typo. */
return (true_vcount[vcount & 0x1ff][STV_VDP2_VRES]); // Non-interlace return (true_vcount[vcount & 0x1ff][STV_VDP2_VRES]); // Non-interlace
@ -6119,7 +6119,7 @@ int saturn_state::stv_vdp2_start ( void )
VIDEO_START_MEMBER(saturn_state,stv_vdp2) VIDEO_START_MEMBER(saturn_state,stv_vdp2)
{ {
int i; int i;
machine().primary_screen->register_screen_bitmap(m_tmpbitmap); machine().first_screen()->register_screen_bitmap(m_tmpbitmap);
stv_vdp2_start(); stv_vdp2_start();
stv_vdp1_start(); stv_vdp1_start();
m_vdpdebug_roz = 0; m_vdpdebug_roz = 0;
@ -6184,9 +6184,9 @@ void saturn_state::stv_vdp2_dynamic_res_change( void )
refresh = HZ_TO_ATTOSECONDS(get_pixel_clock()) * (hblank_period) * vblank_period; refresh = HZ_TO_ATTOSECONDS(get_pixel_clock()) * (hblank_period) * vblank_period;
//printf("%d %d %d %d\n",horz_res,vert_res,horz_res+hblank_period,vblank_period); //printf("%d %d %d %d\n",horz_res,vert_res,horz_res+hblank_period,vblank_period);
machine().primary_screen->configure(hblank_period, vblank_period, visarea, refresh ); machine().first_screen()->configure(hblank_period, vblank_period, visarea, refresh );
} }
// machine().primary_screen->set_visible_area(0*8, horz_res-1,0*8, vert_res-1); // machine().first_screen()->set_visible_area(0*8, horz_res-1,0*8, vert_res-1);
} }
/*This is for calculating the rgb brightness*/ /*This is for calculating the rgb brightness*/

View File

@ -118,7 +118,7 @@ void tms3556_device::device_start()
save_item(NAME(m_char_line_counter)); save_item(NAME(m_char_line_counter));
save_item(NAME(m_dbl_h_phase)); save_item(NAME(m_dbl_h_phase));
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }

View File

@ -343,8 +343,8 @@ void ldplayer_state::device_timer(emu_timer &timer, device_timer_id id, int para
process_commands(); process_commands();
// set a timer to go off on the next VBLANK // set a timer to go off on the next VBLANK
int vblank_scanline = machine().primary_screen->visible_area().max_y + 1; int vblank_scanline = machine().first_screen()->visible_area().max_y + 1;
attotime target = machine().primary_screen->time_until_pos(vblank_scanline); attotime target = machine().first_screen()->time_until_pos(vblank_scanline);
timer_set(target, TIMER_ID_VSYNC_UPDATE); timer_set(target, TIMER_ID_VSYNC_UPDATE);
break; break;
} }

View File

@ -867,14 +867,14 @@ static void starcas_sound_w(running_machine &machine, UINT8 sound_val, UINT8 bit
target_pitch = 0x5800 + (target_pitch << 12); target_pitch = 0x5800 + (target_pitch << 12);
/* once per frame slide the pitch toward the target */ /* once per frame slide the pitch toward the target */
if (machine.primary_screen->frame_number() > state->m_last_frame) if (machine.first_screen()->frame_number() > state->m_last_frame)
{ {
if (state->m_current_pitch > target_pitch) if (state->m_current_pitch > target_pitch)
state->m_current_pitch -= 225; state->m_current_pitch -= 225;
if (state->m_current_pitch < target_pitch) if (state->m_current_pitch < target_pitch)
state->m_current_pitch += 150; state->m_current_pitch += 150;
samples->set_frequency(4, state->m_current_pitch); samples->set_frequency(4, state->m_current_pitch);
state->m_last_frame = machine.primary_screen->frame_number(); state->m_last_frame = machine.first_screen()->frame_number();
} }
/* remember the previous value */ /* remember the previous value */
@ -970,7 +970,7 @@ static void solarq_sound_w(running_machine &machine, UINT8 sound_val, UINT8 bits
state->m_target_volume = 0; state->m_target_volume = 0;
/* ramp the thrust volume */ /* ramp the thrust volume */
if (samples->playing(2) && machine.primary_screen->frame_number() > state->m_last_frame) if (samples->playing(2) && machine.first_screen()->frame_number() > state->m_last_frame)
{ {
if (state->m_current_volume > state->m_target_volume) if (state->m_current_volume > state->m_target_volume)
state->m_current_volume -= 0.078f; state->m_current_volume -= 0.078f;
@ -980,7 +980,7 @@ static void solarq_sound_w(running_machine &machine, UINT8 sound_val, UINT8 bits
samples->set_volume(2, state->m_current_volume); samples->set_volume(2, state->m_current_volume);
else else
samples->stop(2); samples->stop(2);
state->m_last_frame = machine.primary_screen->frame_number(); state->m_last_frame = machine.first_screen()->frame_number();
} }
/* fire - falling edge */ /* fire - falling edge */
@ -1250,14 +1250,14 @@ static void wotw_sound_w(running_machine &machine, UINT8 sound_val, UINT8 bits_c
target_pitch = 0x10000 + (target_pitch << 12); target_pitch = 0x10000 + (target_pitch << 12);
/* once per frame slide the pitch toward the target */ /* once per frame slide the pitch toward the target */
if (machine.primary_screen->frame_number() > state->m_last_frame) if (machine.first_screen()->frame_number() > state->m_last_frame)
{ {
if (state->m_current_pitch > target_pitch) if (state->m_current_pitch > target_pitch)
state->m_current_pitch -= 300; state->m_current_pitch -= 300;
if (state->m_current_pitch < target_pitch) if (state->m_current_pitch < target_pitch)
state->m_current_pitch += 200; state->m_current_pitch += 200;
samples->set_frequency(4, state->m_current_pitch); samples->set_frequency(4, state->m_current_pitch);
state->m_last_frame = machine.primary_screen->frame_number(); state->m_last_frame = machine.first_screen()->frame_number();
} }
/* remember the previous value */ /* remember the previous value */

View File

@ -714,7 +714,7 @@ VIDEO_START( atari )
LOG(("atari antic_vh_start\n")); LOG(("atari antic_vh_start\n"));
memset(&antic, 0, sizeof(antic)); memset(&antic, 0, sizeof(antic));
antic.bitmap = auto_bitmap_ind16_alloc(machine, machine.primary_screen->width(), machine.primary_screen->height()); antic.bitmap = auto_bitmap_ind16_alloc(machine, machine.first_screen()->width(), machine.first_screen()->height());
antic.renderer = antic_mode_0_xx; antic.renderer = antic_mode_0_xx;
antic.cclk_expand = auto_alloc_array(machine, UINT32, 21 * 256); antic.cclk_expand = auto_alloc_array(machine, UINT32, 21 * 256);
@ -758,7 +758,7 @@ VIDEO_START( atari )
LOG(("atari prio_init\n")); LOG(("atari prio_init\n"));
prio_init(); prio_init();
for( i = 0; i < machine.primary_screen->height(); i++ ) for( i = 0; i < machine.first_screen()->height(); i++ )
{ {
antic.video[i] = auto_alloc_clear(machine, VIDEO); antic.video[i] = auto_alloc_clear(machine, VIDEO);
} }
@ -947,7 +947,7 @@ static void antic_linerefresh(running_machine &machine)
UINT32 scanline[4 + (HCHARS * 2) + 4]; UINT32 scanline[4 + (HCHARS * 2) + 4];
/* increment the scanline */ /* increment the scanline */
if( ++antic.scanline == machine.primary_screen->height() ) if( ++antic.scanline == machine.first_screen()->height() )
{ {
/* and return to the top if the frame was complete */ /* and return to the top if the frame was complete */
antic.scanline = 0; antic.scanline = 0;
@ -1049,12 +1049,12 @@ static void antic_linerefresh(running_machine &machine)
static int cycle(running_machine &machine) static int cycle(running_machine &machine)
{ {
return machine.primary_screen->hpos() * CYCLES_PER_LINE / machine.primary_screen->width(); return machine.first_screen()->hpos() * CYCLES_PER_LINE / machine.first_screen()->width();
} }
static void after(running_machine &machine, int cycles, timer_expired_func function, const char *funcname) static void after(running_machine &machine, int cycles, timer_expired_func function, const char *funcname)
{ {
attotime duration = machine.primary_screen->scan_period() * cycles / CYCLES_PER_LINE; attotime duration = machine.first_screen()->scan_period() * cycles / CYCLES_PER_LINE;
(void)funcname; (void)funcname;
LOG((" after %3d (%5.1f us) %s\n", cycles, duration.as_double() * 1.0e6, funcname)); LOG((" after %3d (%5.1f us) %s\n", cycles, duration.as_double() * 1.0e6, funcname));
machine.scheduler().timer_set(duration, function, funcname); machine.scheduler().timer_set(duration, function, funcname);
@ -1355,7 +1355,7 @@ static void antic_scanline_dma(running_machine &machine, int param)
/* produce empty scanlines until vblank start */ /* produce empty scanlines until vblank start */
antic.modelines = VBL_START + 1 - antic.scanline; antic.modelines = VBL_START + 1 - antic.scanline;
if( antic.modelines < 0 ) if( antic.modelines < 0 )
antic.modelines = machine.primary_screen->height() - antic.scanline; antic.modelines = machine.first_screen()->height() - antic.scanline;
LOG((" JVB $%04x\n", antic.dpage|antic.doffs)); LOG((" JVB $%04x\n", antic.dpage|antic.doffs));
} }
else else
@ -1520,7 +1520,7 @@ static void generic_atari_interrupt(running_machine &machine, int button_count)
} }
/* do nothing new for the rest of the frame */ /* do nothing new for the rest of the frame */
antic.modelines = machine.primary_screen->height() - VBL_START; antic.modelines = machine.first_screen()->height() - VBL_START;
antic.renderer = antic_mode_0_xx; antic.renderer = antic_mode_0_xx;
/* if the CPU want's to be interrupted at vertical blank... */ /* if the CPU want's to be interrupted at vertical blank... */

View File

@ -1488,7 +1488,7 @@ static void register_state (running_machine &machine)
static VIDEO_START( avg_common ) static VIDEO_START( avg_common )
{ {
const rectangle &visarea = machine.primary_screen->visible_area(); const rectangle &visarea = machine.first_screen()->visible_area();
avgdvg_vectorram = reinterpret_cast<UINT8 *>(machine.root_device().memshare("vectorram")->ptr()); avgdvg_vectorram = reinterpret_cast<UINT8 *>(machine.root_device().memshare("vectorram")->ptr());
avgdvg_vectorram_size = machine.root_device().memshare("vectorram")->bytes(); avgdvg_vectorram_size = machine.root_device().memshare("vectorram")->bytes();
@ -1525,7 +1525,7 @@ static VIDEO_START( avg_common )
VIDEO_START( dvg ) VIDEO_START( dvg )
{ {
const rectangle &visarea = machine.primary_screen->visible_area(); const rectangle &visarea = machine.first_screen()->visible_area();
avgdvg_vectorram = reinterpret_cast<UINT8 *>(machine.root_device().memshare("vectorram")->ptr()); avgdvg_vectorram = reinterpret_cast<UINT8 *>(machine.root_device().memshare("vectorram")->ptr());
avgdvg_vectorram_size = machine.root_device().memshare("vectorram")->bytes(); avgdvg_vectorram_size = machine.root_device().memshare("vectorram")->bytes();

View File

@ -128,7 +128,7 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_ind16 &bi
if (spriteram[offs] & 0x8000) if (spriteram[offs] & 0x8000)
{ {
int draw = 0; int draw = 0;
if (!flash || (machine.primary_screen->frame_number() & 1)) if (!flash || (machine.first_screen()->frame_number() & 1))
{ {
if (m_priority_type==0) // most cases if (m_priority_type==0) // most cases
{ {

View File

@ -903,8 +903,8 @@ void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_ind16 &bit
void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable ) void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
{ {
int width = machine.primary_screen->width(); int width = machine.first_screen()->width();
int height = machine.primary_screen->height(); int height = machine.first_screen()->height();
int y,x; int y,x;
bitmap_ind16 &tmb = tilemap->pixmap(); bitmap_ind16 &tmb = tilemap->pixmap();
UINT16* srcptr; UINT16* srcptr;

View File

@ -149,7 +149,7 @@ static void gtia_state(running_machine &machine)
static int is_ntsc(running_machine &machine) static int is_ntsc(running_machine &machine)
{ {
return ATTOSECONDS_TO_HZ(machine.primary_screen->frame_period().attoseconds) > 55; return ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds) > 55;
} }

View File

@ -235,14 +235,14 @@ void K001005_init(running_machine &machine)
{ {
int i,k; int i,k;
int width = machine.primary_screen->width(); int width = machine.first_screen()->width();
int height = machine.primary_screen->height(); int height = machine.first_screen()->height();
K001005_zbuffer = auto_bitmap_ind32_alloc(machine, width, height); K001005_zbuffer = auto_bitmap_ind32_alloc(machine, width, height);
gfxrom = machine.root_device().memregion("gfx1")->base(); gfxrom = machine.root_device().memregion("gfx1")->base();
K001005_bitmap[0] = auto_bitmap_rgb32_alloc(machine, machine.primary_screen->width(), machine.primary_screen->height()); K001005_bitmap[0] = auto_bitmap_rgb32_alloc(machine, machine.first_screen()->width(), machine.first_screen()->height());
K001005_bitmap[1] = auto_bitmap_rgb32_alloc(machine, machine.primary_screen->width(), machine.primary_screen->height()); K001005_bitmap[1] = auto_bitmap_rgb32_alloc(machine, machine.first_screen()->width(), machine.first_screen()->height());
K001005_texture = auto_alloc_array(machine, UINT8, 0x800000); K001005_texture = auto_alloc_array(machine, UINT8, 0x800000);
@ -833,7 +833,7 @@ static void draw_scanline_gouraud_blend(void *dest, INT32 scanline, const poly_e
static void render_polygons(running_machine &machine) static void render_polygons(running_machine &machine)
{ {
const rectangle& visarea = machine.primary_screen->visible_area(); const rectangle& visarea = machine.first_screen()->visible_area();
poly_vertex v[4]; poly_vertex v[4];
int poly_type; int poly_type;
int brightness; int brightness;

View File

@ -166,7 +166,7 @@ void hdgsp_read_from_shiftreg(address_space &space, UINT32 address, UINT16 *shif
static void update_palette_bank(running_machine &machine, int newbank) static void update_palette_bank(running_machine &machine, int newbank)
{ {
harddriv_state *state = machine.driver_data<harddriv_state>(); harddriv_state *state = machine.driver_data<harddriv_state>();
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
state->m_gfx_palettebank = newbank; state->m_gfx_palettebank = newbank;
} }

View File

@ -1894,7 +1894,7 @@ static void recoverPolygonBlock(running_machine& machine, const UINT16* packet,
setIdentity(objectMatrix); setIdentity(objectMatrix);
struct polygon lastPoly = { 0 }; struct polygon lastPoly = { 0 };
const rectangle &visarea = machine.primary_screen->visible_area(); const rectangle &visarea = machine.first_screen()->visible_area();
///////////////// /////////////////
// HEADER INFO // // HEADER INFO //
@ -2786,7 +2786,7 @@ static void performFrustumClip(struct polygon *p)
#ifdef UNUSED_FUNCTION #ifdef UNUSED_FUNCTION
static void plot(running_machine &machine, INT32 x, INT32 y, UINT32 color) static void plot(running_machine &machine, INT32 x, INT32 y, UINT32 color)
{ {
UINT32* cb = &(colorBuffer3d[(y * machine.primary_screen->visible_area().max_x) + x]); UINT32* cb = &(colorBuffer3d[(y * machine.first_screen()->visible_area().max_x) + x]);
*cb = color; *cb = color;
} }
@ -2903,8 +2903,8 @@ INLINE void FillSmoothTexPCHorizontalLine(running_machine &machine,
float s_start, float s_delta, float t_start, float t_delta) float s_start, float s_delta, float t_start, float t_delta)
{ {
hng64_state *state = machine.driver_data<hng64_state>(); hng64_state *state = machine.driver_data<hng64_state>();
float* db = &(state->m_depthBuffer3d[(y * machine.primary_screen->visible_area().max_x) + x_start]); float* db = &(state->m_depthBuffer3d[(y * machine.first_screen()->visible_area().max_x) + x_start]);
UINT32* cb = &(state->m_colorBuffer3d[(y * machine.primary_screen->visible_area().max_x) + x_start]); UINT32* cb = &(state->m_colorBuffer3d[(y * machine.first_screen()->visible_area().max_x) + x_start]);
UINT8 paletteEntry = 0; UINT8 paletteEntry = 0;
float t_coord, s_coord; float t_coord, s_coord;

View File

@ -292,7 +292,7 @@ int K055555GX_decode_osmixcolor(int layer, int *color) // (see p.63, p.49-50 and
static void gx_wipezbuf(running_machine &machine, int noshadow) static void gx_wipezbuf(running_machine &machine, int noshadow)
{ {
const rectangle &visarea = machine.primary_screen->visible_area(); const rectangle &visarea = machine.first_screen()->visible_area();
int w = visarea.width(); int w = visarea.width();
int h = visarea.height(); int h = visarea.height();

View File

@ -547,7 +547,7 @@ static void zeus_register16_w(running_machine &machine, offs_t offset, UINT16 da
/* writes to register $CC need to force a partial update */ /* writes to register $CC need to force a partial update */
if ((offset & ~1) == 0xcc) if ((offset & ~1) == 0xcc)
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
/* write to high part on odd addresses */ /* write to high part on odd addresses */
if (offset & 1) if (offset & 1)
@ -573,7 +573,7 @@ static void zeus_register32_w(running_machine &machine, offs_t offset, UINT32 da
/* writes to register $CC need to force a partial update */ /* writes to register $CC need to force a partial update */
if ((offset & ~1) == 0xcc) if ((offset & ~1) == 0xcc)
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
/* always write to low word? */ /* always write to low word? */
state->m_zeusbase[offset & ~1] = data; state->m_zeusbase[offset & ~1] = data;
@ -742,7 +742,7 @@ static void zeus_register_update(running_machine &machine, offs_t offset)
case 0xc6: case 0xc6:
case 0xc8: case 0xc8:
case 0xca: case 0xca:
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
{ {
int vtotal = state->m_zeusbase[0xca] >> 16; int vtotal = state->m_zeusbase[0xca] >> 16;
int htotal = state->m_zeusbase[0xc6] >> 16; int htotal = state->m_zeusbase[0xc6] >> 16;
@ -750,7 +750,7 @@ static void zeus_register_update(running_machine &machine, offs_t offset)
rectangle visarea(state->m_zeusbase[0xc6] & 0xffff, htotal - 3, 0, state->m_zeusbase[0xc8] & 0xffff); rectangle visarea(state->m_zeusbase[0xc6] & 0xffff, htotal - 3, 0, state->m_zeusbase[0xc8] & 0xffff);
if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal) if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal)
{ {
machine.primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal))); machine.first_screen()->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal)));
zeus_cliprect = visarea; zeus_cliprect = visarea;
zeus_cliprect.max_x -= zeus_cliprect.min_x; zeus_cliprect.max_x -= zeus_cliprect.min_x;
zeus_cliprect.min_x = 0; zeus_cliprect.min_x = 0;
@ -759,7 +759,7 @@ static void zeus_register_update(running_machine &machine, offs_t offset)
break; break;
case 0xcc: case 0xcc:
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
log_fifo = machine.input().code_pressed(KEYCODE_L); log_fifo = machine.input().code_pressed(KEYCODE_L);
break; break;

View File

@ -510,7 +510,7 @@ if (regdata_count[offset] < 256)
/* writes to register $CC need to force a partial update */ /* writes to register $CC need to force a partial update */
// if ((offset & ~1) == 0xcc) // if ((offset & ~1) == 0xcc)
// machine.primary_screen->update_partial(machine.primary_screen->vpos()); // machine.first_screen()->update_partial(machine.first_screen()->vpos());
/* always write to low word? */ /* always write to low word? */
state->m_zeusbase[offset] = data; state->m_zeusbase[offset] = data;
@ -562,7 +562,7 @@ static void zeus_register_update(running_machine &machine, offs_t offset, UINT32
case 0x35: case 0x35:
case 0x36: case 0x36:
case 0x37: case 0x37:
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
{ {
int vtotal = state->m_zeusbase[0x37] & 0xffff; int vtotal = state->m_zeusbase[0x37] & 0xffff;
int htotal = state->m_zeusbase[0x34] >> 16; int htotal = state->m_zeusbase[0x34] >> 16;
@ -570,7 +570,7 @@ static void zeus_register_update(running_machine &machine, offs_t offset, UINT32
rectangle visarea(state->m_zeusbase[0x33] >> 16, (state->m_zeusbase[0x34] & 0xffff) - 1, 0, state->m_zeusbase[0x35] & 0xffff); rectangle visarea(state->m_zeusbase[0x33] >> 16, (state->m_zeusbase[0x34] & 0xffff) - 1, 0, state->m_zeusbase[0x35] & 0xffff);
if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal) if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal)
{ {
machine.primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 4.0 / (htotal * vtotal))); machine.first_screen()->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 4.0 / (htotal * vtotal)));
zeus_cliprect = visarea; zeus_cliprect = visarea;
zeus_cliprect.max_x -= zeus_cliprect.min_x; zeus_cliprect.max_x -= zeus_cliprect.min_x;
zeus_cliprect.min_x = 0; zeus_cliprect.min_x = 0;
@ -582,7 +582,7 @@ static void zeus_register_update(running_machine &machine, offs_t offset, UINT32
{ {
UINT32 temp = state->m_zeusbase[0x38]; UINT32 temp = state->m_zeusbase[0x38];
state->m_zeusbase[0x38] = oldval; state->m_zeusbase[0x38] = oldval;
machine.primary_screen->update_partial(machine.primary_screen->vpos()); machine.first_screen()->update_partial(machine.first_screen()->vpos());
log_fifo = machine.input().code_pressed(KEYCODE_L); log_fifo = machine.input().code_pressed(KEYCODE_L);
state->m_zeusbase[0x38] = temp; state->m_zeusbase[0x38] = temp;
} }

View File

@ -1164,7 +1164,7 @@ static int get_list_number(model1_state *state)
static void end_frame(running_machine &machine) static void end_frame(running_machine &machine)
{ {
model1_state *state = machine.driver_data<model1_state>(); model1_state *state = machine.driver_data<model1_state>();
if((state->m_listctl[0] & 4) && (machine.primary_screen->frame_number() & 1)) if((state->m_listctl[0] & 4) && (machine.first_screen()->frame_number() & 1))
state->m_listctl[0] ^= 0x40; state->m_listctl[0] ^= 0x40;
} }

View File

@ -636,12 +636,12 @@ void scn2674_device::scn2674_line(running_machine &machine)
m_scn2674_status_register |= 0x04; m_scn2674_status_register |= 0x04;
if (m_scn2674_irq_mask&0x04) if (m_scn2674_irq_mask&0x04)
{ {
machine.primary_screen->update_partial(m_linecounter); machine.first_screen()->update_partial(m_linecounter);
m_scn2674_irq_register |= 0x04; m_scn2674_irq_register |= 0x04;
LOG2674(("SCN2674 Split Screen 1\n")); LOG2674(("SCN2674 Split Screen 1\n"));
m_scn2674_irq_state = 1; m_scn2674_irq_state = 1;
m_interrupt_callback(1); m_interrupt_callback(1);
// machine.primary_screen->update_partial(m_linecounter); // machine.first_screen()->update_partial(m_linecounter);
} }
} }
@ -656,12 +656,12 @@ void scn2674_device::scn2674_line(running_machine &machine)
m_scn2674_status_register |= 0x01; m_scn2674_status_register |= 0x01;
if (m_scn2674_irq_mask&0x01) if (m_scn2674_irq_mask&0x01)
{ {
machine.primary_screen->update_partial(m_linecounter); machine.first_screen()->update_partial(m_linecounter);
LOG2674(("SCN2674 Split Screen 2 irq\n")); LOG2674(("SCN2674 Split Screen 2 irq\n"));
m_scn2674_irq_state = 1; m_scn2674_irq_state = 1;
m_scn2674_irq_register |= 0x01; m_scn2674_irq_register |= 0x01;
m_interrupt_callback(1); m_interrupt_callback(1);
//machine.primary_screen->update_partial(m_linecounter); //machine.first_screen()->update_partial(m_linecounter);
} }
} }

View File

@ -395,12 +395,12 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_ind16 &b
if (sprite_flip&2) if (sprite_flip&2)
{ {
xflip ^= 1; xflip ^= 1;
sx = machine.primary_screen->visible_area().max_x+1 - sx; sx = machine.first_screen()->visible_area().max_x+1 - sx;
} }
if (sprite_flip&1) if (sprite_flip&1)
{ {
yflip ^= 1; yflip ^= 1;
sy = machine.primary_screen->visible_area().max_y+1 - sy; sy = machine.first_screen()->visible_area().max_y+1 - sy;
} }
/* Palette linking */ /* Palette linking */

View File

@ -1820,8 +1820,8 @@ static const UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 };
// utility function - latches the H/V counters. Used by IRQ, writes to WRIO, etc. // utility function - latches the H/V counters. Used by IRQ, writes to WRIO, etc.
void snes_ppu_class::latch_counters( running_machine &machine ) void snes_ppu_class::latch_counters( running_machine &machine )
{ {
m_beam.current_horz = machine.primary_screen->hpos() / m_htmult; m_beam.current_horz = machine.first_screen()->hpos() / m_htmult;
m_beam.latch_vert = machine.primary_screen->vpos(); m_beam.latch_vert = machine.first_screen()->vpos();
m_beam.latch_horz = m_beam.current_horz; m_beam.latch_horz = m_beam.current_horz;
m_stat78 |= 0x40; // indicate we latched m_stat78 |= 0x40; // indicate we latched
// m_read_ophct = m_read_opvct = 0; // clear read flags - 2009-08: I think we must clear these when STAT78 is read... // m_read_ophct = m_read_opvct = 0; // clear read flags - 2009-08: I think we must clear these when STAT78 is read...
@ -1831,7 +1831,7 @@ void snes_ppu_class::latch_counters( running_machine &machine )
void snes_ppu_class::dynamic_res_change( running_machine &machine ) void snes_ppu_class::dynamic_res_change( running_machine &machine )
{ {
rectangle visarea = machine.primary_screen->visible_area(); rectangle visarea = machine.first_screen()->visible_area();
attoseconds_t refresh; attoseconds_t refresh;
visarea.min_x = visarea.min_y = 0; visarea.min_x = visarea.min_y = 0;
@ -1848,12 +1848,12 @@ void snes_ppu_class::dynamic_res_change( running_machine &machine )
if ((m_stat78 & 0x10) == SNES_NTSC) if ((m_stat78 & 0x10) == SNES_NTSC)
{ {
refresh = HZ_TO_ATTOSECONDS(DOTCLK_NTSC) * SNES_HTOTAL * SNES_VTOTAL_NTSC; refresh = HZ_TO_ATTOSECONDS(DOTCLK_NTSC) * SNES_HTOTAL * SNES_VTOTAL_NTSC;
machine.primary_screen->configure(SNES_HTOTAL * 2, SNES_VTOTAL_NTSC * m_interlace, visarea, refresh); machine.first_screen()->configure(SNES_HTOTAL * 2, SNES_VTOTAL_NTSC * m_interlace, visarea, refresh);
} }
else else
{ {
refresh = HZ_TO_ATTOSECONDS(DOTCLK_PAL) * SNES_HTOTAL * SNES_VTOTAL_PAL; refresh = HZ_TO_ATTOSECONDS(DOTCLK_PAL) * SNES_HTOTAL * SNES_VTOTAL_PAL;
machine.primary_screen->configure(SNES_HTOTAL * 2, SNES_VTOTAL_PAL * m_interlace, visarea, refresh); machine.first_screen()->configure(SNES_HTOTAL * 2, SNES_VTOTAL_PAL * m_interlace, visarea, refresh);
} }
} }

View File

@ -2835,7 +2835,7 @@ inline void taito_f3_state::f3_drawgfxzoom(bitmap_rgb32 &dest_bmp,const rectangl
static void get_sprite_info(running_machine &machine, const UINT16 *spriteram16_ptr) static void get_sprite_info(running_machine &machine, const UINT16 *spriteram16_ptr)
{ {
taito_f3_state *state = machine.driver_data<taito_f3_state>(); taito_f3_state *state = machine.driver_data<taito_f3_state>();
const rectangle &visarea = machine.primary_screen->visible_area(); const rectangle &visarea = machine.first_screen()->visible_area();
const int min_x=visarea.min_x,max_x=visarea.max_x; const int min_x=visarea.min_x,max_x=visarea.max_x;
const int min_y=visarea.min_y,max_y=visarea.max_y; const int min_y=visarea.min_y,max_y=visarea.max_y;
int offs,spritecont,flipx,flipy,/*old_x,*/color,x,y; int offs,spritecont,flipx,flipy,/*old_x,*/color,x,y;

View File

@ -483,7 +483,7 @@ void taitojc_renderer::render_texture_scan(INT32 scanline, const extent_t &exten
void taitojc_renderer::render_polygons(running_machine &machine, UINT16 *polygon_fifo, int length) void taitojc_renderer::render_polygons(running_machine &machine, UINT16 *polygon_fifo, int length)
{ {
// taitojc_state *state = machine.driver_data<taitojc_state>(); // taitojc_state *state = machine.driver_data<taitojc_state>();
const rectangle visarea = machine.primary_screen->visible_area(); const rectangle visarea = machine.first_screen()->visible_area();
vertex_t vert[4]; vertex_t vert[4];
int i; int i;
int ptr; int ptr;

View File

@ -422,7 +422,7 @@ VIDEO_START( pce )
memset(vdc[1].vram, 0, 0x10000); memset(vdc[1].vram, 0, 0x10000);
/* create display bitmap */ /* create display bitmap */
vce.bmp = auto_bitmap_ind16_alloc(machine, machine.primary_screen->width(), machine.primary_screen->height()); vce.bmp = auto_bitmap_ind16_alloc(machine, machine.first_screen()->width(), machine.first_screen()->height());
vdc[0].inc = 1; vdc[0].inc = 1;
vdc[1].inc = 1; vdc[1].inc = 1;

View File

@ -793,7 +793,7 @@ static void hotchase_draw_road(running_machine &machine, bitmap_ind16 &bitmap, c
#define YSIZE 512 #define YSIZE 512
int sx, sy; int sx, sy;
const rectangle &visarea = machine.primary_screen->visible_area(); const rectangle &visarea = machine.first_screen()->visible_area();
/* Let's draw from the top to the bottom of the visible screen */ /* Let's draw from the top to the bottom of the visible screen */
for (sy = visarea.min_y;sy <= visarea.max_y;sy++) for (sy = visarea.min_y;sy <= visarea.max_y;sy++)

View File

@ -1429,7 +1429,7 @@ WRITE16_MEMBER(a2600_state::a2600_tia_vsync_callback)
if ( supported_screen_heights[i] != m_current_screen_height ) if ( supported_screen_heights[i] != m_current_screen_height )
{ {
m_current_screen_height = supported_screen_heights[i]; m_current_screen_height = supported_screen_heights[i];
// machine.primary_screen->configure(228, m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_NTSC ) * 228 * m_current_screen_height ); // machine.first_screen()->configure(228, m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_NTSC ) * 228 * m_current_screen_height );
} }
} }
} }
@ -1446,7 +1446,7 @@ WRITE16_MEMBER(a2600_state::a2600_tia_vsync_callback_pal)
if ( supported_screen_heights[i] != m_current_screen_height ) if ( supported_screen_heights[i] != m_current_screen_height )
{ {
m_current_screen_height = supported_screen_heights[i]; m_current_screen_height = supported_screen_heights[i];
// machine.primary_screen->configure(228, m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_PAL ) * 228 * m_current_screen_height ); // machine.first_screen()->configure(228, m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_PAL ) * 228 * m_current_screen_height );
} }
} }
} }

View File

@ -127,7 +127,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
tile_data = state->m_char_ram[(tile*8+yi) & 0x7ff]; tile_data = state->m_char_ram[(tile*8+yi) & 0x7ff];
if(cursor_on && cursor_addr == addr+x && device->machine().primary_screen->frame_number() & 0x10) if(cursor_on && cursor_addr == addr+x && device->machine().first_screen()->frame_number() & 0x10)
tile_data^=0xff; tile_data^=0xff;
for( xi = 0; xi < 8; xi++) for( xi = 0; xi < 8; xi++)
@ -141,12 +141,12 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
if(yi >= 8) { pen = 0; } if(yi >= 8) { pen = 0; }
/* TODO: pitch is currently 40, this should actually go in the upd7220 device */ /* TODO: pitch is currently 40, this should actually go in the upd7220 device */
if(!device->machine().primary_screen->visible_area().contains(res_x*2+0, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x*2+0, res_y))
continue; continue;
bitmap.pix32(res_y, res_x*2+0) = palette[pen]; bitmap.pix32(res_y, res_x*2+0) = palette[pen];
if(!device->machine().primary_screen->visible_area().contains(res_x*2+1, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x*2+1, res_y))
continue; continue;
bitmap.pix32(res_y, res_x*2+1) = palette[pen]; bitmap.pix32(res_y, res_x*2+1) = palette[pen];

View File

@ -177,7 +177,7 @@ void a7000_state::vidc20_dynamic_screen_change()
{ {
/* finally ready to change the resolution */ /* finally ready to change the resolution */
int hblank_period,vblank_period; int hblank_period,vblank_period;
rectangle visarea = machine().primary_screen->visible_area(); rectangle visarea = machine().first_screen()->visible_area();
hblank_period = (m_vidc20_horz_reg[HCR] & 0x3ffc); hblank_period = (m_vidc20_horz_reg[HCR] & 0x3ffc);
vblank_period = (m_vidc20_vert_reg[VCR] & 0x3fff); vblank_period = (m_vidc20_vert_reg[VCR] & 0x3fff);
/* note that we use the border registers as the visible area */ /* note that we use the border registers as the visible area */
@ -186,7 +186,7 @@ void a7000_state::vidc20_dynamic_screen_change()
visarea.min_y = (m_vidc20_vert_reg[VBSR] & 0x1fff); visarea.min_y = (m_vidc20_vert_reg[VBSR] & 0x1fff);
visarea.max_y = (m_vidc20_vert_reg[VBER] & 0x1fff)-1; visarea.max_y = (m_vidc20_vert_reg[VBER] & 0x1fff)-1;
machine().primary_screen->configure(hblank_period, vblank_period, visarea, machine().primary_screen->frame_period().attoseconds ); machine().first_screen()->configure(hblank_period, vblank_period, visarea, machine().first_screen()->frame_period().attoseconds );
logerror("VIDC20: successfully changed the screen to:\n Display Size = %d x %d\n Border Size %d x %d\n Cycle Period %d x %d\n", logerror("VIDC20: successfully changed the screen to:\n Display Size = %d x %d\n Border Size %d x %d\n Cycle Period %d x %d\n",
(m_vidc20_horz_reg[HDER]-m_vidc20_horz_reg[HDSR]),(m_vidc20_vert_reg[VDER]-m_vidc20_vert_reg[VDSR]), (m_vidc20_horz_reg[HDER]-m_vidc20_horz_reg[HDSR]),(m_vidc20_vert_reg[VDER]-m_vidc20_vert_reg[VDSR]),
(m_vidc20_horz_reg[HBER]-m_vidc20_horz_reg[HBSR]),(m_vidc20_vert_reg[VBER]-m_vidc20_vert_reg[VBSR]), (m_vidc20_horz_reg[HBER]-m_vidc20_horz_reg[HBSR]),(m_vidc20_vert_reg[VBER]-m_vidc20_vert_reg[VBSR]),
@ -257,7 +257,7 @@ WRITE32_MEMBER( a7000_state::a7000_vidc20_w )
if(vert_reg == 4) if(vert_reg == 4)
{ {
if(m_vidc20_vert_reg[VDER] != 0) if(m_vidc20_vert_reg[VDER] != 0)
m_flyback_timer->adjust(machine().primary_screen->time_until_pos(m_vidc20_vert_reg[VDER])); m_flyback_timer->adjust(machine().first_screen()->time_until_pos(m_vidc20_vert_reg[VDER]));
else else
m_flyback_timer->adjust(attotime::never); m_flyback_timer->adjust(attotime::never);
} }
@ -608,7 +608,7 @@ TIMER_CALLBACK_MEMBER(a7000_state::flyback_timer_callback)
generic_pulse_irq_line(m_maincpu, ARM7_IRQ_LINE,1); generic_pulse_irq_line(m_maincpu, ARM7_IRQ_LINE,1);
} }
m_flyback_timer->adjust(machine().primary_screen->time_until_pos(m_vidc20_vert_reg[VDER])); m_flyback_timer->adjust(machine().first_screen()->time_until_pos(m_vidc20_vert_reg[VDER]));
} }
void a7000_state::viddma_transfer_start() void a7000_state::viddma_transfer_start()
@ -643,7 +643,7 @@ READ32_MEMBER( a7000_state::a7000_iomd_r )
UINT8 flyback; UINT8 flyback;
int vert_pos; int vert_pos;
vert_pos = machine().primary_screen->vpos(); vert_pos = machine().first_screen()->vpos();
flyback = (vert_pos <= m_vidc20_vert_reg[VDSR] || vert_pos >= m_vidc20_vert_reg[VDER]) ? 0x80 : 0x00; flyback = (vert_pos <= m_vidc20_vert_reg[VDSR] || vert_pos >= m_vidc20_vert_reg[VDER]) ? 0x80 : 0x00;
return m_IOMD_IO_ctrl | 0x34 | flyback; return m_IOMD_IO_ctrl | 0x34 | flyback;

View File

@ -238,7 +238,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
res_x = (x*8+xi); res_x = (x*8+xi);
res_y = y*lr+yi; res_y = y*lr+yi;
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x, res_y))
continue; continue;
/* /*
@ -271,9 +271,9 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
if(u_line && yi == lr-1) { tile_data = 0xff; } if(u_line && yi == lr-1) { tile_data = 0xff; }
if(o_line && yi == 0) { tile_data = 0xff; } if(o_line && yi == 0) { tile_data = 0xff; }
if(v_line) { tile_data|=1; } if(v_line) { tile_data|=1; }
if(blink && device->machine().primary_screen->frame_number() & 0x20) { tile_data = 0; } // TODO: rate & correct behaviour if(blink && device->machine().first_screen()->frame_number() & 0x20) { tile_data = 0; } // TODO: rate & correct behaviour
if(cursor_on && cursor_addr == tile_addr && device->machine().primary_screen->frame_number() & 0x10) if(cursor_on && cursor_addr == tile_addr && device->machine().first_screen()->frame_number() & 0x10)
tile_data^=0xff; tile_data^=0xff;
if(yi >= char_size) if(yi >= char_size)

View File

@ -296,11 +296,11 @@ READ16_MEMBER(casloopy_state::casloopy_vregs_r)
{ {
if(offset == 4/2) if(offset == 4/2)
{ {
return (machine().primary_screen->vblank() << 8) | (machine().rand() & 0xff); // vblank + vpos? return (machine().first_screen()->vblank() << 8) | (machine().rand() & 0xff); // vblank + vpos?
} }
if(offset == 2/2) if(offset == 2/2)
return machine().rand();/*(machine().primary_screen->hblank() << 8) | (machine().primary_screen->hpos() & 0xff);*/ // hblank + hpos? return machine().rand();/*(machine().first_screen()->hblank() << 8) | (machine().first_screen()->hpos() & 0xff);*/ // hblank + hpos?
if(offset == 0/2) if(offset == 0/2)
return machine().rand(); // pccllect return machine().rand(); // pccllect

View File

@ -175,7 +175,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
res_x = x * 8 + xi; res_x = x * 8 + xi;
res_y = y * lr + yi; res_y = y * lr + yi;
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x, res_y))
continue; continue;
if(yi >= 16) { pen = 0; } if(yi >= 16) { pen = 0; }

View File

@ -1896,7 +1896,7 @@ void fm7_state::machine_reset()
m_subtimer->adjust(attotime::from_msec(20),0,attotime::from_msec(20)); m_subtimer->adjust(attotime::from_msec(20),0,attotime::from_msec(20));
m_keyboard_timer->adjust(attotime::zero,0,attotime::from_msec(10)); m_keyboard_timer->adjust(attotime::zero,0,attotime::from_msec(10));
if(m_type == SYS_FM77AV || m_type == SYS_FM77AV40EX || m_type == SYS_FM11) if(m_type == SYS_FM77AV || m_type == SYS_FM77AV40EX || m_type == SYS_FM11)
m_fm77av_vsync_timer->adjust(machine().primary_screen->time_until_vblank_end()); m_fm77av_vsync_timer->adjust(machine().first_screen()->time_until_vblank_end());
m_irq_mask = 0x00; m_irq_mask = 0x00;
m_irq_flags = 0x00; m_irq_flags = 0x00;

View File

@ -493,7 +493,7 @@ READ32_MEMBER(gba_state::gba_io_r)
} }
break; break;
case 0x0004/4: case 0x0004/4:
retval = (m_DISPSTAT & 0xffff) | (machine().primary_screen->vpos()<<16); retval = (m_DISPSTAT & 0xffff) | (machine().first_screen()->vpos()<<16);
break; break;
case 0x0008/4: case 0x0008/4:
if( (mem_mask) & 0x0000ffff ) if( (mem_mask) & 0x0000ffff )
@ -1767,7 +1767,7 @@ WRITE32_MEMBER(gba_state::gba_io_w)
case 0x0200/4: case 0x0200/4:
if( (mem_mask) & 0x0000ffff ) if( (mem_mask) & 0x0000ffff )
{ {
// printf("IE (%08x) = %04x raw %x (%08x) (scan %d PC %x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, data, ~mem_mask, machine.primary_screen->vpos(), space.device().safe_pc()); // printf("IE (%08x) = %04x raw %x (%08x) (scan %d PC %x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, data, ~mem_mask, machine.first_screen()->vpos(), space.device().safe_pc());
m_IE = ( m_IE & ~mem_mask ) | ( data & mem_mask ); m_IE = ( m_IE & ~mem_mask ) | ( data & mem_mask );
#if 0 #if 0
if (m_IE & m_IF) if (m_IE & m_IF)
@ -1943,7 +1943,7 @@ INPUT_PORTS_END
TIMER_CALLBACK_MEMBER(gba_state::perform_hbl) TIMER_CALLBACK_MEMBER(gba_state::perform_hbl)
{ {
int ch, ctrl; int ch, ctrl;
int scanline = machine().primary_screen->vpos(); int scanline = machine().first_screen()->vpos();
// draw only visible scanlines // draw only visible scanlines
if (scanline < 160) if (scanline < 160)
@ -1977,7 +1977,7 @@ TIMER_CALLBACK_MEMBER(gba_state::perform_scan)
// clear hblank and raster IRQ flags // clear hblank and raster IRQ flags
m_DISPSTAT &= ~(DISPSTAT_HBL|DISPSTAT_VCNT); m_DISPSTAT &= ~(DISPSTAT_HBL|DISPSTAT_VCNT);
scanline = machine().primary_screen->vpos(); scanline = machine().first_screen()->vpos();
// VBL is set for scanlines 160 through 226 (but not 227, which is the last line) // VBL is set for scanlines 160 through 226 (but not 227, which is the last line)
if (scanline >= 160 && scanline < 227) if (scanline >= 160 && scanline < 227)
@ -2043,8 +2043,8 @@ TIMER_CALLBACK_MEMBER(gba_state::perform_scan)
} }
} }
m_hbl_timer->adjust(machine().primary_screen->time_until_pos(scanline, 240)); m_hbl_timer->adjust(machine().first_screen()->time_until_pos(scanline, 240));
m_scan_timer->adjust(machine().primary_screen->time_until_pos(( scanline + 1 ) % 228, 0)); m_scan_timer->adjust(machine().first_screen()->time_until_pos(( scanline + 1 ) % 228, 0));
} }
void gba_state::machine_reset() void gba_state::machine_reset()
@ -2070,7 +2070,7 @@ void gba_state::machine_reset()
m_bios_protected = 0; m_bios_protected = 0;
m_scan_timer->adjust(machine().primary_screen->time_until_pos(0, 0)); m_scan_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
m_hbl_timer->adjust(attotime::never); m_hbl_timer->adjust(attotime::never);
m_dma_timer[0]->adjust(attotime::never); m_dma_timer[0]->adjust(attotime::never);
m_dma_timer[1]->adjust(attotime::never, 1); m_dma_timer[1]->adjust(attotime::never, 1);
@ -2092,7 +2092,7 @@ void gba_state::machine_start()
/* create a timer to fire scanline functions */ /* create a timer to fire scanline functions */
m_scan_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::perform_scan),this)); m_scan_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::perform_scan),this));
m_hbl_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::perform_hbl),this)); m_hbl_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::perform_hbl),this));
m_scan_timer->adjust(machine().primary_screen->time_until_pos(0, 0)); m_scan_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
/* and one for each DMA channel */ /* and one for each DMA channel */
m_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::dma_complete),this)); m_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::dma_complete),this));

View File

@ -241,7 +241,7 @@ void gp32_state::s3c240x_lcd_render_16( )
TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_lcd_timer_exp) TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_lcd_timer_exp)
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
verboselog( machine(), 2, "LCD timer callback\n"); verboselog( machine(), 2, "LCD timer callback\n");
m_s3c240x_lcd.vpos = screen->vpos(); m_s3c240x_lcd.vpos = screen->vpos();
m_s3c240x_lcd.hpos = screen->hpos(); m_s3c240x_lcd.hpos = screen->hpos();
@ -269,7 +269,7 @@ TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_lcd_timer_exp)
void gp32_state::video_start() void gp32_state::video_start()
{ {
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }
UINT32 gp32_state::screen_update_gp32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 gp32_state::screen_update_gp32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@ -289,7 +289,7 @@ READ32_MEMBER(gp32_state::s3c240x_lcd_r)
{ {
// make sure line counter is going // make sure line counter is going
UINT32 lineval = BITS( m_s3c240x_lcd_regs[1], 23, 14); UINT32 lineval = BITS( m_s3c240x_lcd_regs[1], 23, 14);
data = (data & ~0xFFFC0000) | ((lineval - machine().primary_screen->vpos()) << 18); data = (data & ~0xFFFC0000) | ((lineval - machine().first_screen()->vpos()) << 18);
} }
break; break;
} }
@ -299,7 +299,7 @@ READ32_MEMBER(gp32_state::s3c240x_lcd_r)
void gp32_state::s3c240x_lcd_configure() void gp32_state::s3c240x_lcd_configure()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
UINT32 vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk; UINT32 vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk;
double framerate, vclk; double framerate, vclk;
rectangle visarea; rectangle visarea;
@ -325,7 +325,7 @@ void gp32_state::s3c240x_lcd_configure()
void gp32_state::s3c240x_lcd_start() void gp32_state::s3c240x_lcd_start()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
verboselog( machine(), 1, "LCD start\n"); verboselog( machine(), 1, "LCD start\n");
s3c240x_lcd_configure(); s3c240x_lcd_configure();
s3c240x_lcd_dma_init(); s3c240x_lcd_dma_init();

View File

@ -382,13 +382,13 @@ READ8_MEMBER( ie15_state::flag_r ) {
switch (offset) switch (offset)
{ {
case 0: // hsync pulse (not hblank) case 0: // hsync pulse (not hblank)
ret = machine().primary_screen->hpos() < IE15_HORZ_START; ret = machine().first_screen()->hpos() < IE15_HORZ_START;
break; break;
case 1: // marker scanline case 1: // marker scanline
ret = (machine().primary_screen->vpos() % 11) > 7; ret = (machine().first_screen()->vpos() % 11) > 7;
break; break;
case 2: // vblank case 2: // vblank
ret = !machine().primary_screen->vblank(); ret = !machine().first_screen()->vblank();
break; break;
case 4: case 4:
ret = m_ruslat; ret = m_ruslat;
@ -519,7 +519,7 @@ UINT32 ie15_state::draw_scanline(UINT16 *p, UINT16 offset, UINT8 scanline, UINT8
UINT16 x,chr; UINT16 x,chr;
bg = 0; fg = 1; ra = scanline % 8; bg = 0; fg = 1; ra = scanline % 8;
blink = (machine().primary_screen->frame_number() % 10) >= 5; blink = (machine().first_screen()->frame_number() % 10) >= 5;
red = m_io_keyboard->read() & 0x01; red = m_io_keyboard->read() & 0x01;
DBG_LOG(2,"draw_scanline", DBG_LOG(2,"draw_scanline",
@ -577,9 +577,9 @@ UINT32 ie15_state::draw_scanline(UINT16 *p, UINT16 offset, UINT8 scanline, UINT8
TIMER_DEVICE_CALLBACK_MEMBER(ie15_state::scanline_callback) TIMER_DEVICE_CALLBACK_MEMBER(ie15_state::scanline_callback)
{ {
UINT16 y = machine().primary_screen->vpos(); UINT16 y = machine().first_screen()->vpos();
// DBG_LOG(2,"scanline", // DBG_LOG(2,"scanline",
// ("addr %03x frame %lld x %04d y %03d\n", m_videoptr_2, machine().primary_screen->frame_number(), machine().primary_screen->hpos(), y)); // ("addr %03x frame %lld x %04d y %03d\n", m_videoptr_2, machine().first_screen()->frame_number(), machine().first_screen()->hpos(), y));
if (y>=IE15_VERT_START) { if (y>=IE15_VERT_START) {
y -= IE15_VERT_START; y -= IE15_VERT_START;
if (y < IE15_DISP_VERT) { if (y < IE15_DISP_VERT) {

View File

@ -293,12 +293,12 @@ READ8_MEMBER(itt3030_state::vsync_r)
{ {
UINT8 ret = 0; UINT8 ret = 0;
if (machine().primary_screen->vblank()) if (machine().first_screen()->vblank())
{ {
ret |= 0xc0; // set both bits 6 and 7 if vblank ret |= 0xc0; // set both bits 6 and 7 if vblank
} }
if (machine().primary_screen->hblank()) if (machine().first_screen()->hblank())
{ {
ret |= 0x80; // set only bit 7 if hblank ret |= 0x80; // set only bit 7 if hblank
} }

View File

@ -55,7 +55,7 @@ PALETTE_INIT_MEMBER(lynx_state, lynx)
void lynx_state::video_start() void lynx_state::video_start()
{ {
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }
UINT32 lynx_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) UINT32 lynx_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)

View File

@ -106,7 +106,7 @@ void multi8_state::video_start()
void multi8_state::multi8_draw_pixel(bitmap_ind16 &bitmap,int y,int x,UINT8 pen,UINT8 width) void multi8_state::multi8_draw_pixel(bitmap_ind16 &bitmap,int y,int x,UINT8 pen,UINT8 width)
{ {
if(!machine().primary_screen->visible_area().contains(x, y)) if(!machine().first_screen()->visible_area().contains(x, y))
return; return;
if(width) if(width)
@ -195,8 +195,8 @@ UINT32 multi8_state::screen_update_multi8(screen_device &screen, bitmap_ind16 &b
{ {
case 0x00: cursor_on = 1; break; //always on case 0x00: cursor_on = 1; break; //always on
case 0x20: cursor_on = 0; break; //always off case 0x20: cursor_on = 0; break; //always off
case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink case 0x40: if(machine().first_screen()->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink case 0x60: if(machine().first_screen()->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
} }
if(cursor_on) if(cursor_on)

View File

@ -635,7 +635,7 @@ READ8_MEMBER(mz2000_state::mz2000_portb_r)
else else
res |= 0x20; res |= 0x20;
res |= (machine().primary_screen->vblank()) ? 0x00 : 0x01; res |= (machine().first_screen()->vblank()) ? 0x00 : 0x01;
return res; return res;
} }

View File

@ -712,7 +712,7 @@ void mz2500_state::mz2500_reconfigure_screen()
//popmessage("%d %d %d %d %02x",vs,ve,hs,he,m_cg_reg[0x0e]); //popmessage("%d %d %d %d %02x",vs,ve,hs,he,m_cg_reg[0x0e]);
machine().primary_screen->configure(720, 480, visarea, machine().primary_screen->frame_period().attoseconds); machine().first_screen()->configure(720, 480, visarea, machine().first_screen()->frame_period().attoseconds);
/* calculate CG window parameters here */ /* calculate CG window parameters here */
m_cg_vs = (m_cg_reg[0x08]) | ((m_cg_reg[0x09]<<8) & 1); m_cg_vs = (m_cg_reg[0x08]) | ((m_cg_reg[0x09]<<8) & 1);
@ -1032,8 +1032,8 @@ READ8_MEMBER(mz2500_state::mz2500_crtc_hvblank_r)
{ {
UINT8 vblank_bit, hblank_bit; UINT8 vblank_bit, hblank_bit;
vblank_bit = machine().primary_screen->vblank() ? 0 : 1; vblank_bit = machine().first_screen()->vblank() ? 0 : 1;
hblank_bit = machine().primary_screen->hblank() ? 0 : 2; hblank_bit = machine().first_screen()->hblank() ? 0 : 2;
return vblank_bit | hblank_bit; return vblank_bit | hblank_bit;
} }
@ -1307,7 +1307,7 @@ READ8_MEMBER(mz2500_state::mz2500_rplane_latch_r)
{ {
UINT8 vblank_bit; UINT8 vblank_bit;
vblank_bit = machine().primary_screen->vblank() ? 0 : 0x80 | m_cg_clear_flag; vblank_bit = machine().first_screen()->vblank() ? 0 : 0x80 | m_cg_clear_flag;
return vblank_bit; return vblank_bit;
} }
@ -1884,7 +1884,7 @@ READ8_MEMBER(mz2500_state::mz2500_portb_r)
{ {
UINT8 vblank_bit; UINT8 vblank_bit;
vblank_bit = machine().primary_screen->vblank() ? 0 : 1; //Guess: NOBO wants this bit to be high/low vblank_bit = machine().first_screen()->vblank() ? 0 : 1; //Guess: NOBO wants this bit to be high/low
return 0xfe | vblank_bit; return 0xfe | vblank_bit;
} }

View File

@ -316,7 +316,7 @@ PALETTE_INIT_MEMBER(osbexec_state, osbexec)
void osbexec_state::video_start() void osbexec_state::video_start()
{ {
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }
UINT32 osbexec_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) UINT32 osbexec_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@ -515,7 +515,7 @@ static const floppy_interface osbexec_floppy_interface =
TIMER_CALLBACK_MEMBER(osbexec_state::osbexec_video_callback) TIMER_CALLBACK_MEMBER(osbexec_state::osbexec_video_callback)
{ {
int y = machine().primary_screen->vpos(); int y = machine().first_screen()->vpos();
/* Start of frame */ /* Start of frame */
if ( y == 0 ) if ( y == 0 )
@ -562,7 +562,7 @@ TIMER_CALLBACK_MEMBER(osbexec_state::osbexec_video_callback)
} }
} }
m_video_timer->adjust( machine().primary_screen->time_until_pos( y + 1, 0 ) ); m_video_timer->adjust( machine().first_screen()->time_until_pos( y + 1, 0 ) );
} }
@ -587,7 +587,7 @@ void osbexec_state::machine_reset()
set_banks( machine() ); set_banks( machine() );
m_video_timer->adjust( machine().primary_screen->time_until_pos( 0, 0 ) ); m_video_timer->adjust( machine().first_screen()->time_until_pos( 0, 0 ) );
m_rtc = 0; m_rtc = 0;
} }

View File

@ -660,7 +660,7 @@ UINT32 pasogo_state::screen_update_pasogo(screen_device &screen, bitmap_ind16 &b
if (w!=width || h!=height) if (w!=width || h!=height)
{ {
width = w; height = h; width = w; height = h;
// machine().primary_screen->set_visible_area(0, width - 1, 0, height - 1); // machine().first_screen()->set_visible_area(0, width - 1, 0, height - 1);
screen.set_visible_area(0, width - 1, 0, height - 1); screen.set_visible_area(0, width - 1, 0, height - 1);
} }
#endif #endif

View File

@ -209,8 +209,8 @@ void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &clipre
{ {
case 0x00: cursor_on = 1; break; //always on case 0x00: cursor_on = 1; break; //always on
case 0x20: cursor_on = 0; break; //always off case 0x20: cursor_on = 0; break; //always off
case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink case 0x40: if(machine().first_screen()->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink case 0x60: if(machine().first_screen()->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
} }
if(cursor_on) if(cursor_on)
@ -287,8 +287,8 @@ void pasopia7_state::draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cli
{ {
case 0x00: cursor_on = 1; break; //always on case 0x00: cursor_on = 1; break; //always on
case 0x20: cursor_on = 0; break; //always off case 0x20: cursor_on = 0; break; //always off
case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink case 0x40: if(machine().first_screen()->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink case 0x60: if(machine().first_screen()->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
} }
if(cursor_on) if(cursor_on)
@ -811,7 +811,7 @@ READ8_MEMBER( pasopia7_state::crtc_portb_r )
// --x- ---- vsync bit // --x- ---- vsync bit
// ---x ---- hardcoded bit, defines if the system screen is raster (1) or LCD (0) // ---x ---- hardcoded bit, defines if the system screen is raster (1) or LCD (0)
// ---- x--- disp bit // ---- x--- disp bit
UINT8 vdisp = (machine().primary_screen->vpos() < (m_screen_type ? 200 : 28)) ? 0x08 : 0x00; //TODO: check LCD vpos trigger UINT8 vdisp = (machine().first_screen()->vpos() < (m_screen_type ? 200 : 28)) ? 0x08 : 0x00; //TODO: check LCD vpos trigger
UINT8 vsync = vdisp ? 0x00 : 0x20; UINT8 vsync = vdisp ? 0x00 : 0x20;
return 0x40 | (m_attr_latch & 0x87) | vsync | vdisp | (m_screen_type << 4); return 0x40 | (m_attr_latch & 0x87) | vsync | vdisp | (m_screen_type << 4);

View File

@ -1337,14 +1337,14 @@ WRITE8_MEMBER(pc6001_state::pc6001m2_vram_bank_w)
{ {
/* Apparently bitmap modes changes the screen res to 320 x 200 */ /* Apparently bitmap modes changes the screen res to 320 x 200 */
{ {
rectangle visarea = machine().primary_screen->visible_area(); rectangle visarea = machine().first_screen()->visible_area();
int y_height; int y_height;
y_height = (m_exgfx_bitmap_mode || m_exgfx_2bpp_mode) ? 200 : 240; y_height = (m_exgfx_bitmap_mode || m_exgfx_2bpp_mode) ? 200 : 240;
visarea.set(0, (320) - 1, 0, (y_height) - 1); visarea.set(0, (320) - 1, 0, (y_height) - 1);
machine().primary_screen->configure(320, 240, visarea, machine().primary_screen->frame_period().attoseconds); machine().first_screen()->configure(320, 240, visarea, machine().first_screen()->frame_period().attoseconds);
} }
} }

View File

@ -675,7 +675,7 @@ UINT8 pc8801_state::calc_cursor_pos(int x,int y,int yi)
if(!(m_crtc.param[0][2] & 0x20)) if(!(m_crtc.param[0][2] & 0x20))
return 1; return 1;
if(((machine().primary_screen->frame_number() / blink_speed) & 1) == 0) if(((machine().first_screen()->frame_number() / blink_speed) & 1) == 0)
return 1; return 1;
return 0; return 0;
@ -754,7 +754,7 @@ void pc8801_state::pc8801_draw_char(bitmap_ind16 &bitmap,int x,int y,int pal,UIN
res_x = x*8+xi*(width+1); res_x = x*8+xi*(width+1);
res_y = y*y_height+yi; res_y = y*y_height+yi;
if(!machine().primary_screen->visible_area().contains(res_x, res_y)) if(!machine().first_screen()->visible_area().contains(res_x, res_y))
continue; continue;
if(gfx_mode) if(gfx_mode)
@ -771,7 +771,7 @@ void pc8801_state::pc8801_draw_char(bitmap_ind16 &bitmap,int x,int y,int pal,UIN
UINT8 blink_mask; UINT8 blink_mask;
blink_mask = 0; blink_mask = 0;
if(blink && ((machine().primary_screen->frame_number() / blink_speed) & 3) == 1) if(blink && ((machine().first_screen()->frame_number() / blink_speed) & 3) == 1)
blink_mask = 1; blink_mask = 1;
if(yi >= (1 << (y_double+3)) || secret || blink_mask) if(yi >= (1 << (y_double+3)) || secret || blink_mask)
@ -799,7 +799,7 @@ void pc8801_state::pc8801_draw_char(bitmap_ind16 &bitmap,int x,int y,int pal,UIN
bitmap.pix16(res_y, res_x) = m_palette->pen(color); bitmap.pix16(res_y, res_x) = m_palette->pen(color);
if(width) if(width)
{ {
if(!machine().primary_screen->visible_area().contains(res_x+1, res_y)) if(!machine().first_screen()->visible_area().contains(res_x+1, res_y))
continue; continue;
bitmap.pix16(res_y, res_x+1) = m_palette->pen(color); bitmap.pix16(res_y, res_x+1) = m_palette->pen(color);
@ -1241,7 +1241,7 @@ WRITE8_MEMBER(pc8801_state::pc8801_ext_rom_bank_w)
UINT8 pc8801_state::pc8801_pixel_clock(void) UINT8 pc8801_state::pc8801_pixel_clock(void)
{ {
int ysize = machine().primary_screen->height(); /* TODO: correct condition*/ int ysize = machine().first_screen()->height(); /* TODO: correct condition*/
return (ysize >= 400); return (ysize >= 400);
} }
@ -1269,7 +1269,7 @@ void pc8801_state::pc8801_dynamic_res_change(void)
else else
refresh = HZ_TO_ATTOSECONDS(PIXEL_CLOCK_15KHz) * (xsize) * ysize; refresh = HZ_TO_ATTOSECONDS(PIXEL_CLOCK_15KHz) * (xsize) * ysize;
machine().primary_screen->configure(xsize, ysize, visarea, refresh); machine().first_screen()->configure(xsize, ysize, visarea, refresh);
} }
WRITE8_MEMBER(pc8801_state::pc8801_gfx_ctrl_w) WRITE8_MEMBER(pc8801_state::pc8801_gfx_ctrl_w)

View File

@ -804,7 +804,7 @@ void pc88va_state::execute_sync_cmd()
refresh = HZ_TO_ATTOSECONDS(60); refresh = HZ_TO_ATTOSECONDS(60);
machine().primary_screen->configure(640, 480, visarea, refresh); machine().first_screen()->configure(640, 480, visarea, refresh);
} }
void pc88va_state::execute_dspon_cmd() void pc88va_state::execute_dspon_cmd()
@ -957,7 +957,7 @@ WRITE16_MEMBER(pc88va_state::palette_ram_w)
READ16_MEMBER(pc88va_state::sys_port4_r) READ16_MEMBER(pc88va_state::sys_port4_r)
{ {
UINT8 vrtc,sw1; UINT8 vrtc,sw1;
vrtc = (machine().primary_screen->vpos() < 200) ? 0x20 : 0x00; // vblank vrtc = (machine().first_screen()->vpos() < 200) ? 0x20 : 0x00; // vblank
sw1 = (ioport("DSW")->read() & 1) ? 2 : 0; sw1 = (ioport("DSW")->read() & 1) ? 2 : 0;

View File

@ -804,8 +804,8 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off
return; return;
// popmessage("%02x %d",state->m_video_ff[INTERLACE_REG],device->machine().primary_screen->visible_area().max_y + 1); // popmessage("%02x %d",state->m_video_ff[INTERLACE_REG],device->machine().first_screen()->visible_area().max_y + 1);
// interlace_on = ((device->machine().primary_screen->visible_area().max_y + 1) >= 400) ? 1 : 0; // interlace_on = ((device->machine().first_screen()->visible_area().max_y + 1) >= 400) ? 1 : 0;
interlace_on = state->m_video_ff[INTERLACE_REG]; interlace_on = state->m_video_ff[INTERLACE_REG];
colors16_mode = (state->m_ex_video_ff[ANALOG_16_MODE]) ? 16 : 8; colors16_mode = (state->m_ex_video_ff[ANALOG_16_MODE]) ? 16 : 8;
@ -816,13 +816,13 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
res_x = x + xi; res_x = x + xi;
res_y = y; res_y = y;
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y*2+0)) if(!device->machine().first_screen()->visible_area().contains(res_x, res_y*2+0))
return; return;
pen = state->m_ext_gvram[(address*8+xi)+(state->m_vram_disp*0x40000)]; pen = state->m_ext_gvram[(address*8+xi)+(state->m_vram_disp*0x40000)];
bitmap.pix32(res_y*2+0, res_x) = palette[pen + 0x20]; bitmap.pix32(res_y*2+0, res_x) = palette[pen + 0x20];
if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+1)) if(device->machine().first_screen()->visible_area().contains(res_x, res_y*2+1))
bitmap.pix32(res_y*2+1, res_x) = palette[pen + 0x20]; bitmap.pix32(res_y*2+1, res_x) = palette[pen + 0x20];
} }
} }
@ -841,10 +841,10 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
if(interlace_on) if(interlace_on)
{ {
if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+0)) if(device->machine().first_screen()->visible_area().contains(res_x, res_y*2+0))
bitmap.pix32(res_y*2+0, res_x) = palette[pen + colors16_mode]; bitmap.pix32(res_y*2+0, res_x) = palette[pen + colors16_mode];
/* TODO: it looks like that PC-98xx can only display even lines ... */ /* TODO: it looks like that PC-98xx can only display even lines ... */
if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+1)) if(device->machine().first_screen()->visible_area().contains(res_x, res_y*2+1))
bitmap.pix32(res_y*2+1, res_x) = palette[pen + colors16_mode]; bitmap.pix32(res_y*2+1, res_x) = palette[pen + colors16_mode];
} }
else else
@ -931,7 +931,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
res_x = ((x+kanji_lr)*8+xi) * (state->m_video_ff[WIDTH40_REG]+1); res_x = ((x+kanji_lr)*8+xi) * (state->m_video_ff[WIDTH40_REG]+1);
res_y = y*lr+yi - (state->m_txt_scroll_reg[3] & 0xf); res_y = y*lr+yi - (state->m_txt_scroll_reg[3] & 0xf);
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x, res_y))
continue; continue;
tile_data = 0; tile_data = 0;
@ -972,10 +972,10 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
if(v_line) { tile_data|=8; } if(v_line) { tile_data|=8; }
/* TODO: proper blink rate for these two */ /* TODO: proper blink rate for these two */
if(cursor_on && cursor_addr == tile_addr && device->machine().primary_screen->frame_number() & 0x10) if(cursor_on && cursor_addr == tile_addr && device->machine().first_screen()->frame_number() & 0x10)
tile_data^=0xff; tile_data^=0xff;
if(blink && device->machine().primary_screen->frame_number() & 0x10) if(blink && device->machine().first_screen()->frame_number() & 0x10)
tile_data^=0xff; tile_data^=0xff;
if(yi >= char_size) if(yi >= char_size)
@ -988,7 +988,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
if(state->m_video_ff[WIDTH40_REG]) if(state->m_video_ff[WIDTH40_REG])
{ {
if(!device->machine().primary_screen->visible_area().contains(res_x+1, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x+1, res_y))
continue; continue;
if(pen != -1) if(pen != -1)

View File

@ -1760,7 +1760,7 @@ static const speaker_interface pokemini_speaker_interface =
void pokemini_state::video_start() void pokemini_state::video_start()
{ {
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }

View File

@ -210,7 +210,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
if(cursor_on && cursor_addr == addr+x) //TODO if(cursor_on && cursor_addr == addr+x) //TODO
tile_data^=0xff; tile_data^=0xff;
if(attr & 0x80 && device->machine().primary_screen->frame_number() & 0x10) //TODO: check for blinking interval if(attr & 0x80 && device->machine().first_screen()->frame_number() & 0x10) //TODO: check for blinking interval
tile_data=0; tile_data=0;
for( xi = 0; xi < 8; xi++) for( xi = 0; xi < 8; xi++)
@ -220,7 +220,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
res_x = x * 8 + xi; res_x = x * 8 + xi;
res_y = y * lr + yi; res_y = y * lr + yi;
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y)) if(!device->machine().first_screen()->visible_area().contains(res_x, res_y))
continue; continue;
if(yi >= 16) if(yi >= 16)

View File

@ -125,7 +125,7 @@ WRITE8_MEMBER(samcoupe_state::samcoupe_disk_w)
READ8_MEMBER(samcoupe_state::samcoupe_pen_r) READ8_MEMBER(samcoupe_state::samcoupe_pen_r)
{ {
screen_device *scr = machine().primary_screen; screen_device *scr = machine().first_screen();
UINT8 data; UINT8 data;
if (offset & 0x100) if (offset & 0x100)

View File

@ -420,7 +420,7 @@ void scv_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
{ {
case TIMER_VB: case TIMER_VB:
{ {
int vpos = machine().primary_screen->vpos(); int vpos = machine().first_screen()->vpos();
switch( vpos ) switch( vpos )
{ {
@ -432,7 +432,7 @@ void scv_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
break; break;
} }
m_vb_timer->adjust(machine().primary_screen->time_until_pos((vpos + 1) % 262, 0)); m_vb_timer->adjust(machine().first_screen()->time_until_pos((vpos + 1) % 262, 0));
} }
break; break;
@ -791,7 +791,7 @@ void scv_state::machine_start()
void scv_state::machine_reset() void scv_state::machine_reset()
{ {
m_vb_timer->adjust(machine().primary_screen->time_until_pos(0, 0)); m_vb_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
scv_set_banks(); scv_set_banks();
} }

View File

@ -220,7 +220,7 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
case 3: bk_pen = (color ^ 0xf); break; //complementary case 3: bk_pen = (color ^ 0xf); break; //complementary
} }
if(blink && machine().primary_screen->frame_number() & 0x10) //blinking, used by Dragon's Alphabet if(blink && machine().first_screen()->frame_number() & 0x10) //blinking, used by Dragon's Alphabet
color = bk_pen; color = bk_pen;
for(yi=0;yi<8;yi++) for(yi=0;yi<8;yi++)
@ -254,8 +254,8 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
{ {
case 0x00: cursor_on = 1; break; //always on case 0x00: cursor_on = 1; break; //always on
case 0x20: cursor_on = 0; break; //always off case 0x20: cursor_on = 0; break; //always off
case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink case 0x40: if(machine().first_screen()->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink case 0x60: if(machine().first_screen()->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
} }
if(cursor_on) if(cursor_on)

View File

@ -225,7 +225,7 @@ void spectrum_state::spectrum_128_update_memory()
READ8_MEMBER( spectrum_state::spectrum_128_ula_r ) READ8_MEMBER( spectrum_state::spectrum_128_ula_r )
{ {
int vpos = machine().primary_screen->vpos(); int vpos = machine().first_screen()->vpos();
return vpos<193 ? m_screen_location[0x1800|(vpos&0xf8)<<2]:0xff; return vpos<193 ? m_screen_location[0x1800|(vpos&0xf8)<<2]:0xff;
} }

View File

@ -411,7 +411,7 @@ READ8_MEMBER(spectrum_state::spectrum_port_df_r)
READ8_MEMBER(spectrum_state::spectrum_port_ula_r) READ8_MEMBER(spectrum_state::spectrum_port_ula_r)
{ {
int vpos = machine().primary_screen->vpos(); int vpos = machine().first_screen()->vpos();
return vpos<193 ? m_video_ram[(vpos&0xf8)<<2]:0xff; return vpos<193 ? m_video_ram[(vpos&0xf8)<<2]:0xff;
} }

View File

@ -1525,7 +1525,7 @@ TIMER_CALLBACK_MEMBER(supracan_state::supracan_line_off_callback)
TIMER_CALLBACK_MEMBER(supracan_state::supracan_video_callback) TIMER_CALLBACK_MEMBER(supracan_state::supracan_video_callback)
{ {
int vpos = machine().primary_screen->vpos(); int vpos = machine().first_screen()->vpos();
m_video_regs[0] &= ~0x0002; m_video_regs[0] &= ~0x0002;
@ -1556,10 +1556,10 @@ TIMER_CALLBACK_MEMBER(supracan_state::supracan_video_callback)
break; break;
} }
m_video_regs[1] = machine().primary_screen->vpos()-16; // for son of evil, wants vblank active around 224 instead... m_video_regs[1] = machine().first_screen()->vpos()-16; // for son of evil, wants vblank active around 224 instead...
m_hbl_timer->adjust( machine().primary_screen->time_until_pos( vpos, 320 ) ); m_hbl_timer->adjust( machine().first_screen()->time_until_pos( vpos, 320 ) );
m_video_timer->adjust( machine().primary_screen->time_until_pos( ( vpos + 1 ) % 256, 0 ) ); m_video_timer->adjust( machine().first_screen()->time_until_pos( ( vpos + 1 ) % 256, 0 ) );
} }
WRITE16_MEMBER( supracan_state::supracan_video_w ) WRITE16_MEMBER( supracan_state::supracan_video_w )
@ -1569,7 +1569,7 @@ WRITE16_MEMBER( supracan_state::supracan_video_w )
int i; int i;
// if any of this changes we need a partial update (see sango fighters intro) // if any of this changes we need a partial update (see sango fighters intro)
machine().primary_screen->update_partial(machine().primary_screen->vpos()); machine().first_screen()->update_partial(machine().first_screen()->vpos());
COMBINE_DATA(&m_video_regs[offset]); COMBINE_DATA(&m_video_regs[offset]);
data = m_video_regs[offset]; data = m_video_regs[offset];
@ -1650,10 +1650,10 @@ WRITE16_MEMBER( supracan_state::supracan_video_w )
verboselog("maincpu", 3, "video_flags = %04x\n", data); verboselog("maincpu", 3, "video_flags = %04x\n", data);
m_video_flags = data; m_video_flags = data;
rectangle visarea = machine().primary_screen->visible_area(); rectangle visarea = machine().first_screen()->visible_area();
visarea.set(0, ((m_video_flags & 0x100) ? 320 : 256) - 1, 8, 232 - 1); visarea.set(0, ((m_video_flags & 0x100) ? 320 : 256) - 1, 8, 232 - 1);
machine().primary_screen->configure(348, 256, visarea, machine().primary_screen->frame_period().attoseconds); machine().first_screen()->configure(348, 256, visarea, machine().first_screen()->frame_period().attoseconds);
} }
break; break;
case 0x0a/2: case 0x0a/2:
@ -1662,7 +1662,7 @@ WRITE16_MEMBER( supracan_state::supracan_video_w )
verboselog("maincpu", 0, "IRQ Trigger? = %04x\n", data); verboselog("maincpu", 0, "IRQ Trigger? = %04x\n", data);
if(data & 0x8000) if(data & 0x8000)
{ {
m_line_on_timer->adjust(machine().primary_screen->time_until_pos((data & 0x00ff), 0)); m_line_on_timer->adjust(machine().first_screen()->time_until_pos((data & 0x00ff), 0));
} }
else else
{ {
@ -1676,7 +1676,7 @@ WRITE16_MEMBER( supracan_state::supracan_video_w )
verboselog("maincpu", 0, "IRQ De-Trigger? = %04x\n", data); verboselog("maincpu", 0, "IRQ De-Trigger? = %04x\n", data);
if(data & 0x8000) if(data & 0x8000)
{ {
m_line_off_timer->adjust(machine().primary_screen->time_until_pos(data & 0x00ff, 0)); m_line_off_timer->adjust(machine().first_screen()->time_until_pos(data & 0x00ff, 0));
} }
else else
{ {
@ -1794,7 +1794,7 @@ void supracan_state::machine_reset()
{ {
m_soundcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_soundcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_video_timer->adjust( machine().primary_screen->time_until_pos( 0, 0 ) ); m_video_timer->adjust( machine().first_screen()->time_until_pos( 0, 0 ) );
m_irq_mask = 0; m_irq_mask = 0;
} }

View File

@ -63,7 +63,7 @@ private:
void uzebox_state::machine_start() void uzebox_state::machine_start()
{ {
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }
void uzebox_state::machine_reset() void uzebox_state::machine_reset()

View File

@ -1273,7 +1273,7 @@ void vboy_state::m_set_irq(UINT16 irq_vector)
/* TODO: obviously all of this needs clean-ups and better implementation ... */ /* TODO: obviously all of this needs clean-ups and better implementation ... */
void vboy_state::m_scanline_tick(int scanline, UINT8 screen_type) void vboy_state::m_scanline_tick(int scanline, UINT8 screen_type)
{ {
//int frame_num = machine().primary_screen->frame_number(); //int frame_num = machine().first_screen()->frame_number();
if(screen_type == 0) if(screen_type == 0)
m_row_num = (scanline / 8) & 0x1f; m_row_num = (scanline / 8) & 0x1f;

View File

@ -231,7 +231,7 @@ VIDEO_START_MEMBER(x1_state,x1)
void x1_state::x1_draw_pixel(running_machine &machine, bitmap_rgb32 &bitmap,int y,int x,UINT16 pen,UINT8 width,UINT8 height) void x1_state::x1_draw_pixel(running_machine &machine, bitmap_rgb32 &bitmap,int y,int x,UINT16 pen,UINT8 width,UINT8 height)
{ {
if(!machine.primary_screen->visible_area().contains(x, y)) if(!machine.first_screen()->visible_area().contains(x, y))
return; return;
if(width && height) if(width && height)
@ -429,7 +429,7 @@ void x1_state::draw_fgtilemap(running_machine &machine, bitmap_rgb32 &bitmap,con
pcg_pen = pen[2]<<2|pen[1]<<1|pen[0]<<0; pcg_pen = pen[2]<<2|pen[1]<<1|pen[0]<<0;
if(color & 0x10 && machine.primary_screen->frame_number() & 0x10) //reverse flickering if(color & 0x10 && machine.first_screen()->frame_number() & 0x10) //reverse flickering
pcg_pen^=7; pcg_pen^=7;
if(pcg_pen == 0 && (!(color & 8))) if(pcg_pen == 0 && (!(color & 8)))
@ -1098,11 +1098,11 @@ UINT16 x1_state::check_chr_addr()
UINT16 x1_state::get_pcg_addr( UINT16 width, UINT8 y_char_size ) UINT16 x1_state::get_pcg_addr( UINT16 width, UINT8 y_char_size )
{ {
int hbeam = machine().primary_screen->hpos() >> 3; int hbeam = machine().first_screen()->hpos() >> 3;
int vbeam = machine().primary_screen->vpos() / y_char_size; int vbeam = machine().first_screen()->vpos() / y_char_size;
UINT16 pcg_offset = ((hbeam + vbeam*width) + (((m_crtc_vreg[0x0c]<<8) & 0x3f00) | (m_crtc_vreg[0x0d] & 0xff))) & 0x7ff; UINT16 pcg_offset = ((hbeam + vbeam*width) + (((m_crtc_vreg[0x0c]<<8) & 0x3f00) | (m_crtc_vreg[0x0d] & 0xff))) & 0x7ff;
//printf("%08x %d %d %d %d\n",(hbeam+vbeam*width),hbeam,vbeam,machine.primary_screen->vpos() & 7,width); //printf("%08x %d %d %d %d\n",(hbeam+vbeam*width),hbeam,vbeam,machine.first_screen()->vpos() & 7,width);
return pcg_offset; return pcg_offset;
} }
@ -1135,7 +1135,7 @@ READ8_MEMBER( x1_state::x1_pcg_r )
y_char_size = ((m_crtc_vreg[9]+1) > 8) ? 8 : m_crtc_vreg[9]+1; y_char_size = ((m_crtc_vreg[9]+1) > 8) ? 8 : m_crtc_vreg[9]+1;
if(y_char_size == 0) { y_char_size = 1; } if(y_char_size == 0) { y_char_size = 1; }
pcg_offset = m_tvram[get_pcg_addr(m_crtc_vreg[1], y_char_size)]*8; pcg_offset = m_tvram[get_pcg_addr(m_crtc_vreg[1], y_char_size)]*8;
pcg_offset+= machine().primary_screen->vpos() & (y_char_size-1); pcg_offset+= machine().first_screen()->vpos() & (y_char_size-1);
if(addr) { pcg_offset+= ((addr-1)*0x800); } if(addr) { pcg_offset+= ((addr-1)*0x800); }
res = gfx_data[pcg_offset]; res = gfx_data[pcg_offset];
} }
@ -1175,7 +1175,7 @@ WRITE8_MEMBER( x1_state::x1_pcg_w )
y_char_size = (m_crtc_vreg[9]+1) > 8 ? (m_crtc_vreg[9]+1)-8 : m_crtc_vreg[9]+1; y_char_size = (m_crtc_vreg[9]+1) > 8 ? (m_crtc_vreg[9]+1)-8 : m_crtc_vreg[9]+1;
if(y_char_size == 0) { y_char_size = 1; } if(y_char_size == 0) { y_char_size = 1; }
pcg_offset = m_tvram[get_pcg_addr(m_crtc_vreg[1], y_char_size)]*8; pcg_offset = m_tvram[get_pcg_addr(m_crtc_vreg[1], y_char_size)]*8;
pcg_offset+= machine().primary_screen->vpos() & (y_char_size-1); pcg_offset+= machine().first_screen()->vpos() & (y_char_size-1);
pcg_offset+= ((addr-1)*0x800); pcg_offset+= ((addr-1)*0x800);
m_pcg_ram[pcg_offset] = data; m_pcg_ram[pcg_offset] = data;
@ -1237,10 +1237,10 @@ WRITE8_MEMBER( x1_state::x1_pal_r_w )
{ {
m_x_r = data; m_x_r = data;
set_current_palette(); set_current_palette();
//if(m_old_vpos != machine().primary_screen->vpos()) //if(m_old_vpos != machine().first_screen()->vpos())
//{ //{
// machine().primary_screen->update_partial(machine().primary_screen->vpos()); // machine().first_screen()->update_partial(machine().first_screen()->vpos());
// m_old_vpos = machine().primary_screen->vpos(); // m_old_vpos = machine().first_screen()->vpos();
//} //}
} }
} }
@ -1256,10 +1256,10 @@ WRITE8_MEMBER( x1_state::x1_pal_g_w )
{ {
m_x_g = data; m_x_g = data;
set_current_palette(); set_current_palette();
//if(m_old_vpos != machine().primary_screen->vpos()) //if(m_old_vpos != machine().first_screen()->vpos())
//{ //{
machine().primary_screen->update_partial(machine().primary_screen->vpos()); machine().first_screen()->update_partial(machine().first_screen()->vpos());
// m_old_vpos = machine().primary_screen->vpos(); // m_old_vpos = machine().first_screen()->vpos();
//} //}
} }
} }
@ -1275,10 +1275,10 @@ WRITE8_MEMBER( x1_state::x1_pal_b_w )
{ {
m_x_b = data; m_x_b = data;
set_current_palette(); set_current_palette();
//if(m_old_vpos != machine().primary_screen->vpos()) //if(m_old_vpos != machine().first_screen()->vpos())
//{ //{
// machine().primary_screen->update_partial(machine().primary_screen->vpos()); // machine().first_screen()->update_partial(machine().first_screen()->vpos());
// m_old_vpos = machine().primary_screen->vpos(); // m_old_vpos = machine().first_screen()->vpos();
//} //}
} }
} }
@ -1804,8 +1804,8 @@ READ8_MEMBER( x1_state::x1_portb_r )
UINT8 res = 0; UINT8 res = 0;
int vblank_line = m_crtc_vreg[6] * (m_crtc_vreg[9]+1); int vblank_line = m_crtc_vreg[6] * (m_crtc_vreg[9]+1);
int vsync_line = m_crtc_vreg[7] * (m_crtc_vreg[9]+1); int vsync_line = m_crtc_vreg[7] * (m_crtc_vreg[9]+1);
m_vdisp = (machine().primary_screen->vpos() < vblank_line) ? 0x80 : 0x00; m_vdisp = (machine().first_screen()->vpos() < vblank_line) ? 0x80 : 0x00;
m_vsync = (machine().primary_screen->vpos() < vsync_line) ? 0x00 : 0x04; m_vsync = (machine().first_screen()->vpos() < vsync_line) ? 0x00 : 0x04;
// popmessage("%d",vsync_line); // popmessage("%d",vsync_line);
// popmessage("%d",vblank_line); // popmessage("%d",vblank_line);

View File

@ -1715,15 +1715,15 @@ MACHINE_RESET_MEMBER(x68k_state,x68000)
m_crtc.reg[7] = 552; // Vertical end m_crtc.reg[7] = 552; // Vertical end
m_crtc.reg[8] = 27; // Horizontal adjust m_crtc.reg[8] = 27; // Horizontal adjust
m_scanline = machine().primary_screen->vpos();// = m_crtc.reg[6]; // Vertical start m_scanline = machine().first_screen()->vpos();// = m_crtc.reg[6]; // Vertical start
// start VBlank timer // start VBlank timer
m_crtc.vblank = 1; m_crtc.vblank = 1;
irq_time = machine().primary_screen->time_until_pos(m_crtc.reg[6],2); irq_time = machine().first_screen()->time_until_pos(m_crtc.reg[6],2);
m_vblank_irq->adjust(irq_time); m_vblank_irq->adjust(irq_time);
// start HBlank timer // start HBlank timer
m_scanline_timer->adjust(machine().primary_screen->scan_period(), 1); m_scanline_timer->adjust(machine().first_screen()->scan_period(), 1);
/// TODO: get callbacks to trigger these /// TODO: get callbacks to trigger these
m_mfpdev->i0_w(1); // alarm m_mfpdev->i0_w(1); // alarm

View File

@ -75,7 +75,7 @@ void amigakbd_device::device_timer(emu_timer &timer, device_timer_id id, int par
/* if we still have more data, schedule another update */ /* if we still have more data, schedule another update */
if ( m_buf_pos != m_cur_pos ) if ( m_buf_pos != m_cur_pos )
{ {
m_timer->adjust(machine().primary_screen->frame_period() / 4); m_timer->adjust(machine().first_screen()->frame_period() / 4);
} }
} }
@ -116,7 +116,7 @@ INPUT_CHANGED_MEMBER(amigakbd_device::kbd_update)
/* if the buffer was empty and we have new data, start a timer to send the keystrokes */ /* if the buffer was empty and we have new data, start a timer to send the keystrokes */
if ( key_buf_was_empty && ( m_buf_pos != m_cur_pos ) ) if ( key_buf_was_empty && ( m_buf_pos != m_cur_pos ) )
{ {
m_timer->adjust(machine().primary_screen->frame_period() / 4); m_timer->adjust(machine().first_screen()->frame_period() / 4);
} }
} }
} }

View File

@ -1181,7 +1181,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2_state::apple2_interrupt)
int scanline = param; int scanline = param;
if((scanline % 8) == 0) if((scanline % 8) == 0)
machine().primary_screen->update_partial(machine().primary_screen->vpos()); machine().first_screen()->update_partial(machine().first_screen()->vpos());
if ((m_kbspecial->read() & 0x80) && if ((m_kbspecial->read() & 0x80) &&
(a2_no_ctrl_reset() || (m_kbspecial->read() & 0x08))) (a2_no_ctrl_reset() || (m_kbspecial->read() & 0x08)))
{ {
@ -1675,7 +1675,7 @@ READ8_MEMBER( apple2_state::apple2_c01x_r )
case 0x06: result |= (m_flags & VAR_ALTZP) ? 0x80 : 0x00; break; case 0x06: result |= (m_flags & VAR_ALTZP) ? 0x80 : 0x00; break;
case 0x07: result |= (m_flags & VAR_SLOTC3ROM) ? 0x80 : 0x00; break; case 0x07: result |= (m_flags & VAR_SLOTC3ROM) ? 0x80 : 0x00; break;
case 0x08: result |= (m_flags & VAR_80STORE) ? 0x80 : 0x00; break; case 0x08: result |= (m_flags & VAR_80STORE) ? 0x80 : 0x00; break;
case 0x09: result |= !space.machine().primary_screen->vblank() ? 0x80 : 0x00; break; case 0x09: result |= !space.machine().first_screen()->vblank() ? 0x80 : 0x00; break;
case 0x0A: result |= (m_flags & VAR_TEXT) ? 0x80 : 0x00; break; case 0x0A: result |= (m_flags & VAR_TEXT) ? 0x80 : 0x00; break;
case 0x0B: result |= (m_flags & VAR_MIXED) ? 0x80 : 0x00; break; case 0x0B: result |= (m_flags & VAR_MIXED) ? 0x80 : 0x00; break;
case 0x0C: result |= (m_flags & VAR_PAGE2) ? 0x80 : 0x00; break; case 0x0C: result |= (m_flags & VAR_PAGE2) ? 0x80 : 0x00; break;

View File

@ -726,8 +726,8 @@ TIMER_CALLBACK_MEMBER(apple2gs_state::apple2gs_scanline_tick)
{ {
int scanline; int scanline;
scanline = machine().primary_screen->vpos(); scanline = machine().first_screen()->vpos();
machine().primary_screen->update_partial(scanline); machine().first_screen()->update_partial(scanline);
/* check scanline interrupt bits if we're in super hi-res and the current scanline is within the active display area */ /* check scanline interrupt bits if we're in super hi-res and the current scanline is within the active display area */
if ((m_newvideo & 0x80) && (scanline >= (BORDER_TOP-1)) && (scanline < (200+BORDER_TOP-1))) if ((m_newvideo & 0x80) && (scanline >= (BORDER_TOP-1)) && (scanline < (200+BORDER_TOP-1)))
@ -768,15 +768,15 @@ TIMER_CALLBACK_MEMBER(apple2gs_state::apple2gs_scanline_tick)
#endif #endif
/* call Apple II interrupt handler */ /* call Apple II interrupt handler */
if ((machine().primary_screen->vpos() % 8) == 7) if ((machine().first_screen()->vpos() % 8) == 7)
{ {
//apple2_interrupt(m_maincpu); //apple2_interrupt(m_maincpu);
/* TODO: check me! */ /* TODO: check me! */
machine().primary_screen->update_partial(machine().primary_screen->vpos()); machine().first_screen()->update_partial(machine().first_screen()->vpos());
} }
} }
m_scanline_timer->adjust(machine().primary_screen->time_until_pos((scanline+1)%262, 0)); m_scanline_timer->adjust(machine().first_screen()->time_until_pos((scanline+1)%262, 0));
} }
@ -881,7 +881,7 @@ int apple2gs_state::apple2gs_get_vpos()
}; };
scan = machine().primary_screen->vpos(); scan = machine().first_screen()->vpos();
if (scan < BORDER_TOP) if (scan < BORDER_TOP)
{ {
@ -920,7 +920,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r )
#endif #endif
case 0x19: /* C019 - RDVBLBAR */ case 0x19: /* C019 - RDVBLBAR */
result = (space.machine().primary_screen->vpos() >= (192+BORDER_TOP)) ? 0x80 : 0x00; result = (space.machine().first_screen()->vpos() >= (192+BORDER_TOP)) ? 0x80 : 0x00;
break; break;
case 0x22: /* C022 - TBCOLOR */ case 0x22: /* C022 - TBCOLOR */
@ -1021,7 +1021,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r )
break; break;
case 0x2F: /* C02F - HORIZCNT */ case 0x2F: /* C02F - HORIZCNT */
result = space.machine().primary_screen->hpos() / 11; result = space.machine().first_screen()->hpos() / 11;
if (result > 0) if (result > 0)
{ {
result += 0x40; result += 0x40;
@ -2068,7 +2068,7 @@ MACHINE_START_MEMBER(apple2gs_state,apple2gscommon)
m_scanline_timer->adjust(attotime::never); m_scanline_timer->adjust(attotime::never);
// fire on scanline zero // fire on scanline zero
m_scanline_timer->adjust(machine().primary_screen->time_until_pos(0, 0)); m_scanline_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
} }
MACHINE_START_MEMBER(apple2gs_state,apple2gs) MACHINE_START_MEMBER(apple2gs_state,apple2gs)

View File

@ -372,8 +372,8 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
TIMER_DEVICE_CALLBACK_MEMBER(apple3_state::apple3_interrupt) TIMER_DEVICE_CALLBACK_MEMBER(apple3_state::apple3_interrupt)
{ {
m_via_1->write_cb1(machine().primary_screen->vblank()); m_via_1->write_cb1(machine().first_screen()->vblank());
m_via_1->write_cb2(machine().primary_screen->vblank()); m_via_1->write_cb2(machine().first_screen()->vblank());
} }
UINT8 *apple3_state::apple3_bankaddr(UINT16 bank, offs_t offset) UINT8 *apple3_state::apple3_bankaddr(UINT16 bank, offs_t offset)

View File

@ -808,7 +808,7 @@ void coco_state::poll_joystick(bool *joyin, UINT8 *buttons)
/* get the vertical position of the lightgun */ /* get the vertical position of the lightgun */
dclg_vpos = analog->input(joystick, 1); dclg_vpos = analog->input(joystick, 1);
if (machine().primary_screen->vpos() == dclg_vpos) if (machine().first_screen()->vpos() == dclg_vpos)
{ {
/* if gun is pointing at the current scan line, set hit bit and cache horizontal timer value */ /* if gun is pointing at the current scan line, set hit bit and cache horizontal timer value */
m_dclg_output_h |= 0x02; m_dclg_output_h |= 0x02;
@ -820,7 +820,7 @@ void coco_state::poll_joystick(bool *joyin, UINT8 *buttons)
if (m_dclg_state == 7) if (m_dclg_state == 7)
{ {
/* while in state 7, prepare to check next video frame for a hit */ /* while in state 7, prepare to check next video frame for a hit */
attotime dclg_time = machine().primary_screen->time_until_pos(dclg_vpos, 0); attotime dclg_time = machine().first_screen()->time_until_pos(dclg_vpos, 0);
m_diecom_lightgun_timer->adjust(dclg_time); m_diecom_lightgun_timer->adjust(dclg_time);
} }
break; break;

View File

@ -234,7 +234,7 @@ void gamecom_state::recompute_lcd_params()
hblank_period = (H_timing + 200); hblank_period = (H_timing + 200);
refresh = HZ_TO_ATTOSECONDS(pixel_clock) * (hblank_period) * vblank_period; refresh = HZ_TO_ATTOSECONDS(pixel_clock) * (hblank_period) * vblank_period;
machine().primary_screen->configure((hblank_period), (vblank_period), visarea, refresh ); machine().first_screen()->configure((hblank_period), (vblank_period), visarea, refresh );
} }
WRITE8_MEMBER( gamecom_state::gamecom_internal_w ) WRITE8_MEMBER( gamecom_state::gamecom_internal_w )

View File

@ -499,7 +499,7 @@ READ8_MEMBER(hp48_state::hp48_io_r)
case 0x29: case 0x29:
{ {
int last_line = HP48_IO_8(0x28) & 0x3f; /* last line of main bitmap before menu */ int last_line = HP48_IO_8(0x28) & 0x3f; /* last line of main bitmap before menu */
int cur_line = space.machine().primary_screen->vpos(); int cur_line = space.machine().first_screen()->vpos();
if ( last_line <= 1 ) last_line = 0x3f; if ( last_line <= 1 ) last_line = 0x3f;
data = ( cur_line >= 0 && cur_line <= last_line ) ? last_line - cur_line : 0; data = ( cur_line >= 0 && cur_line <= last_line ) ? last_line - cur_line : 0;
if ( offset == 0x29 ) if ( offset == 0x29 )

View File

@ -1407,7 +1407,7 @@ READ16_MEMBER(lisa_state::lisa_r)
/* problem : due to collisions with video, timings of the LISA CPU /* problem : due to collisions with video, timings of the LISA CPU
are slightly different from timings of a bare 68k */ are slightly different from timings of a bare 68k */
/* so we use a kludge... */ /* so we use a kludge... */
int time_in_frame = machine().primary_screen->vpos(); int time_in_frame = machine().first_screen()->vpos();
/* the BOOT ROM only reads 56 bits, so there must be some wrap-around for /* the BOOT ROM only reads 56 bits, so there must be some wrap-around for
videoROM_address <= 56 */ videoROM_address <= 56 */
@ -1814,7 +1814,7 @@ READ16_MEMBER(lisa_state::lisa_IO_r)
if (m_VTIR<=1) if (m_VTIR<=1)
// GFE : needs to be in phase with Serial NUM // GFE : needs to be in phase with Serial NUM
{ {
int time_in_frame = machine().primary_screen->vpos(); int time_in_frame = machine().first_screen()->vpos();
if (m_features.has_mac_xl_video) if (m_features.has_mac_xl_video)
{ {
if ((time_in_frame >= 374) && (time_in_frame <= 392)) /* these values have not been tested */ if ((time_in_frame >= 374) && (time_in_frame <= 392)) /* these values have not been tested */

View File

@ -1417,7 +1417,7 @@ void lynx_state::lynx_timer_signal_irq(int which)
lynx_timer_count_down(2); lynx_timer_count_down(2);
break; break;
case 2: case 2:
copybitmap(m_bitmap, m_bitmap_temp, 0, 0, 0, 0, machine().primary_screen->cliprect()); copybitmap(m_bitmap, m_bitmap_temp, 0, 0, 0, 0, machine().first_screen()->cliprect());
lynx_timer_count_down(4); lynx_timer_count_down(4);
break; break;
case 1: case 1:

View File

@ -1251,9 +1251,9 @@ READ8_MEMBER(mac_state::mac_via_in_b)
{ {
int val = 0; int val = 0;
/* video beam in display (! VBLANK && ! HBLANK basically) */ /* video beam in display (! VBLANK && ! HBLANK basically) */
if (machine().primary_screen) if (machine().first_screen())
{ {
if (machine().primary_screen->vpos() >= MAC_V_VIS) if (machine().first_screen()->vpos() >= MAC_V_VIS)
val |= 0x40; val |= 0x40;
} }
@ -1298,9 +1298,9 @@ READ8_MEMBER(mac_state::mac_via_in_b_via2pmu)
int val = 0; int val = 0;
// TODO: is this valid for VIA2 PMU machines? // TODO: is this valid for VIA2 PMU machines?
/* video beam in display (! VBLANK && ! HBLANK basically) */ /* video beam in display (! VBLANK && ! HBLANK basically) */
if (machine().primary_screen) if (machine().first_screen())
{ {
if (machine().primary_screen->vpos() >= MAC_V_VIS) if (machine().first_screen()->vpos() >= MAC_V_VIS)
val |= 0x40; val |= 0x40;
} }
@ -1742,10 +1742,10 @@ void mac_state::machine_start()
} }
} }
if (machine().primary_screen) if (machine().first_screen())
{ {
this->m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mac_state::mac_scanline_tick),this)); this->m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mac_state::mac_scanline_tick),this));
this->m_scanline_timer->adjust(machine().primary_screen->time_until_pos(0, 0)); this->m_scanline_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
} }
m_6015_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mac_state::mac_6015_tick),this)); m_6015_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mac_state::mac_6015_tick),this));
@ -2218,7 +2218,7 @@ TIMER_CALLBACK_MEMBER(mac_state::mac_scanline_tick)
} }
} }
scanline = machine().primary_screen->vpos(); scanline = machine().first_screen()->vpos();
if (scanline == MAC_V_VIS) if (scanline == MAC_V_VIS)
vblank_irq(); vblank_irq();
@ -2229,7 +2229,7 @@ TIMER_CALLBACK_MEMBER(mac_state::mac_scanline_tick)
mouse_callback(); mouse_callback();
} }
m_scanline_timer->adjust(machine().primary_screen->time_until_pos((scanline+1) % MAC_V_TOTAL, 0)); m_scanline_timer->adjust(machine().first_screen()->time_until_pos((scanline+1) % MAC_V_TOTAL, 0));
} }
WRITE_LINE_MEMBER(mac_state::nubus_irq_9_w) WRITE_LINE_MEMBER(mac_state::nubus_irq_9_w)

View File

@ -92,7 +92,7 @@ READ8_MEMBER(mz_state::mz700_e008_r)
data |= m_other_timer; data |= m_other_timer;
data |= ioport("JOY")->read(); data |= ioport("JOY")->read();
data |= machine().primary_screen->hblank() << 7; data |= machine().first_screen()->hblank() << 7;
LOG(1, "mz700_e008_r", ("%02X\n", data), machine()); LOG(1, "mz700_e008_r", ("%02X\n", data), machine());
@ -431,7 +431,7 @@ READ8_MEMBER(mz_state::pio_port_c_r)
data |= 0x20; /* set the RDATA status */ data |= 0x20; /* set the RDATA status */
data |= m_cursor_timer << 6; data |= m_cursor_timer << 6;
data |= machine().primary_screen->vblank() << 7; data |= machine().first_screen()->vblank() << 7;
LOG(2,"mz700_pio_port_c_r",("%02X\n", data),machine()); LOG(2,"mz700_pio_port_c_r",("%02X\n", data),machine());
@ -524,7 +524,7 @@ READ8_MEMBER(mz_state::mz800_z80pio_port_a_r)
result |= m_centronics_busy; result |= m_centronics_busy;
result |= m_centronics_perror << 1; result |= m_centronics_perror << 1;
result |= machine().primary_screen->hblank() << 5; result |= machine().first_screen()->hblank() << 5;
return result; return result;
} }

View File

@ -75,7 +75,7 @@ WRITE8_MEMBER(orion_state::orion128_romdisk_w)
void orion_state::orion_set_video_mode(int width) void orion_state::orion_set_video_mode(int width)
{ {
rectangle visarea(0, width-1, 0, 255); rectangle visarea(0, width-1, 0, 255);
machine().primary_screen->configure(width, 256, visarea, machine().primary_screen->frame_period().attoseconds); machine().first_screen()->configure(width, 256, visarea, machine().first_screen()->frame_period().attoseconds);
} }
WRITE8_MEMBER(orion_state::orion128_video_mode_w) WRITE8_MEMBER(orion_state::orion128_video_mode_w)

View File

@ -325,7 +325,7 @@ void osborne1_state::device_timer(emu_timer &timer, device_timer_id id, int para
TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback) TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
{ {
int y = machine().primary_screen->vpos(); int y = machine().first_screen()->vpos();
UINT8 ra=0,chr,gfx,dim; UINT8 ra=0,chr,gfx,dim;
UINT16 x,ma; UINT16 x,ma;
@ -378,7 +378,7 @@ TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
m_beep->set_state( 0 ); m_beep->set_state( 0 );
} }
m_video_timer->adjust(machine().primary_screen->time_until_pos(y + 1, 0 )); m_video_timer->adjust(machine().first_screen()->time_until_pos(y + 1, 0 ));
} }
TIMER_CALLBACK_MEMBER(osborne1_state::setup_osborne1) TIMER_CALLBACK_MEMBER(osborne1_state::setup_osborne1)
@ -443,7 +443,7 @@ DRIVER_INIT_MEMBER(osborne1_state,osborne1)
/* Configure the 6850 ACIA */ /* Configure the 6850 ACIA */
// acia6850_config( 0, &osborne1_6850_config ); // acia6850_config( 0, &osborne1_6850_config );
m_video_timer = timer_alloc(TIMER_VIDEO); m_video_timer = timer_alloc(TIMER_VIDEO);
m_video_timer->adjust(machine().primary_screen->time_until_pos(1, 0 )); m_video_timer->adjust(machine().first_screen()->time_until_pos(1, 0 ));
timer_set(attotime::zero, TIMER_SETUP); timer_set(attotime::zero, TIMER_SETUP);
} }
@ -451,7 +451,7 @@ DRIVER_INIT_MEMBER(osborne1_state,osborne1)
void osborne1_state::video_start() void osborne1_state::video_start()
{ {
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }
UINT32 osborne1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) UINT32 osborne1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)

View File

@ -82,7 +82,7 @@ READ8_MEMBER(primo_state::primo_be_1_r)
// bit 7, 6 - not used // bit 7, 6 - not used
// bit 5 - VBLANK // bit 5 - VBLANK
data |= (machine().primary_screen->vblank()) ? 0x20 : 0x00; data |= (machine().first_screen()->vblank()) ? 0x20 : 0x00;
// bit 4 - I4 (external bus) // bit 4 - I4 (external bus)

View File

@ -567,7 +567,7 @@ READ32_MEMBER( s3c44b0_device::lcd_r )
void s3c44b0_device::lcd_configure() void s3c44b0_device::lcd_configure()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
int dismode, clkval, lineval, wdly, hozval, lineblank, wlh, mclk; int dismode, clkval, lineval, wdly, hozval, lineblank, wlh, mclk;
double vclk, framerate; double vclk, framerate;
int width, height; int width, height;
@ -620,7 +620,7 @@ void s3c44b0_device::lcd_configure()
void s3c44b0_device::lcd_start() void s3c44b0_device::lcd_start()
{ {
screen_device *screen = machine().primary_screen; screen_device *screen = machine().first_screen();
verboselog(machine(), 1, "LCD start\n"); verboselog(machine(), 1, "LCD start\n");
lcd_configure(); lcd_configure();
lcd_dma_init(); lcd_dma_init();

View File

@ -301,7 +301,7 @@ void samcoupe_state::machine_start()
/* schedule our video updates */ /* schedule our video updates */
m_video_update_timer = timer_alloc(TIMER_VIDEO_UPDATE); m_video_update_timer = timer_alloc(TIMER_VIDEO_UPDATE);
m_video_update_timer->adjust(machine().primary_screen->time_until_pos(0, 0)); m_video_update_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
} }
/*************************************************************************** /***************************************************************************

View File

@ -42,7 +42,7 @@ WRITE8_MEMBER( vector06_state::vector06_8255_porta_w )
void vector06_state::vector06_set_video_mode(int width) void vector06_state::vector06_set_video_mode(int width)
{ {
rectangle visarea(0, width+64-1, 0, 256+64-1); rectangle visarea(0, width+64-1, 0, 256+64-1);
machine().primary_screen->configure(width+64, 256+64, visarea, machine().primary_screen->frame_period().attoseconds); machine().first_screen()->configure(width+64, 256+64, visarea, machine().first_screen()->frame_period().attoseconds);
} }
WRITE8_MEMBER( vector06_state::vector06_8255_portb_w ) WRITE8_MEMBER( vector06_state::vector06_8255_portb_w )

View File

@ -13,9 +13,9 @@
#define DEBUG_ZX81_PORTS 1 #define DEBUG_ZX81_PORTS 1
#define DEBUG_ZX81_VSYNC 1 #define DEBUG_ZX81_VSYNC 1
#define LOG_ZX81_IOR(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOR: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().primary_screen->vpos(), _comment); } while (0) #define LOG_ZX81_IOR(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOR: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().first_screen()->vpos(), _comment); } while (0)
#define LOG_ZX81_IOW(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOW: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().primary_screen->vpos(), _comment); } while (0) #define LOG_ZX81_IOW(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOW: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().first_screen()->vpos(), _comment); } while (0)
#define LOG_ZX81_VSYNC do { if (DEBUG_ZX81_VSYNC) logerror("VSYNC starts in scanline: %d\n", space.machine().primary_screen->vpos()); } while (0) #define LOG_ZX81_VSYNC do { if (DEBUG_ZX81_VSYNC) logerror("VSYNC starts in scanline: %d\n", space.machine().first_screen()->vpos()); } while (0)
WRITE8_MEMBER(zx_state::zx_ram_w) WRITE8_MEMBER(zx_state::zx_ram_w)

View File

@ -68,7 +68,7 @@ void a7800_state::video_start()
m_maria_kangaroo = 0; m_maria_kangaroo = 0;
m_maria_rm = 0; m_maria_rm = 0;
machine().primary_screen->register_screen_bitmap(m_bitmap); machine().first_screen()->register_screen_bitmap(m_bitmap);
} }
/*************************************************************************** /***************************************************************************

View File

@ -134,8 +134,8 @@ inline pen_t st_state::shift_mode_2()
void st_state::shifter_tick() void st_state::shifter_tick()
{ {
int y = machine().primary_screen->vpos(); int y = machine().first_screen()->vpos();
int x = machine().primary_screen->hpos(); int x = machine().first_screen()->hpos();
pen_t pen; pen_t pen;
@ -193,8 +193,8 @@ inline void st_state::shifter_load()
void st_state::glue_tick() void st_state::glue_tick()
{ {
int y = machine().primary_screen->vpos(); int y = machine().first_screen()->vpos();
int x = machine().primary_screen->hpos(); int x = machine().first_screen()->hpos();
int v = (y >= m_shifter_y_start) && (y < m_shifter_y_end); int v = (y >= m_shifter_y_start) && (y < m_shifter_y_end);
int h = (x >= m_shifter_x_start) && (x < m_shifter_x_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_shifter_timer = timer_alloc(TIMER_SHIFTER_TICK);
m_glue_timer = timer_alloc(TIMER_GLUE_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_shifter_timer->adjust(machine().first_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_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 */ /* register for state saving */
save_item(NAME(m_shifter_base)); save_item(NAME(m_shifter_base));

View File

@ -108,13 +108,13 @@ void bbc_state::set_pixel_lookup()
WRITE8_MEMBER(bbc_state::bbc_videoULA_w) WRITE8_MEMBER(bbc_state::bbc_videoULA_w)
{ {
// Make sure vpos is never <0 2008-10-11 PHS. // 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) if(vpos==0)
machine().primary_screen->update_partial(vpos); machine().first_screen()->update_partial(vpos);
else 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) switch (offset&0x01)

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