- More machine->screen removal

- Hooked up swapped videoram in Karnov properly -- same idea as Burger Time
This commit is contained in:
Zsolt Vasvari 2008-03-11 16:16:30 +00:00
parent 706d9f408f
commit 86b798b37a
71 changed files with 191 additions and 233 deletions

View File

@ -2006,12 +2006,11 @@ static void execute_snap(int ref, int params, const char *param[])
mame_file *fp;
const char *filename = param[0];
int scrnum = (params > 1) ? atoi(param[1]) : 0;
UINT32 mask = render_get_live_screens_mask();
astring *fname;
const device_config *screen = device_list_find_by_index(Machine->config->devicelist, VIDEO_SCREEN, scrnum);
if ((screen == NULL) || !(mask & (1 << scrnum)))
if ((screen == NULL) || !render_is_live_screen(screen))
{
debug_console_printf("Invalid screen number '%d'\n", scrnum);
return;

View File

@ -51,6 +51,7 @@
- calls the driver's DRIVER_INIT callback
- calls device_list_start() [devintrf.c] to start any devices
- calls video_init() [video.c] to start the video system
- calls tilemap_init() [tilemap.c] to start the tilemap system
- calls crosshair_init() [crsshair.c] to configure the crosshairs
- calls sound_init() [sound.c] to start the audio system
- calls mame_debug_init() [debugcpu.c] to set up the debugger
@ -1580,6 +1581,7 @@ static void init_machine(running_machine *machine)
/* start the video and audio hardware */
video_init(machine);
tilemap_init(machine);
crosshair_init(machine);
sound_init(machine);

View File

@ -898,20 +898,31 @@ void render_set_rescale_notify(running_machine *machine, int (*notifier)(running
/*-------------------------------------------------
render_get_live_screens_mask - return a
bitmask indicating the live screens
render_is_live_screen - return if the screen
is 'live'
-------------------------------------------------*/
UINT32 render_get_live_screens_mask(void)
int render_is_live_screen(const device_config *screen)
{
render_target *target;
int screen_index;
UINT32 bitmask = 0;
assert(screen != NULL);
assert(screen->machine != NULL);
assert(screen->machine->config != NULL);
assert(screen->machine->config->devicelist != NULL);
assert(screen->tag != NULL);
screen_index = device_list_index(screen->machine->config->devicelist, VIDEO_SCREEN, screen->tag);
assert(screen_index != -1);
/* iterate over all live targets and or together their screen masks */
for (target = targetlist; target != NULL; target = target->next)
bitmask |= target->curview->screens;
return bitmask;
return (bitmask & (1 << screen_index)) ? TRUE : FALSE;
}

View File

@ -308,8 +308,8 @@ void render_init(running_machine *machine);
/* set a notifier that we call before doing long scaling operations */
void render_set_rescale_notify(running_machine *machine, int (*notifier)(running_machine *, int, int));
/* return a bitmask indicating the live screens */
UINT32 render_get_live_screens_mask(void);
/* return a boolean indicating if the screen is live */
int render_is_live_screen(const device_config *screen);
/* return the smallest maximum update rate across all targets */
float render_get_max_update_rate(void);

View File

@ -48,9 +48,6 @@
typedef struct _internal_screen_state internal_screen_state;
struct _internal_screen_state
{
/* basic information about this screen */
int scrnum; /* the screen index */
/* textures and bitmaps */
render_texture * texture[2]; /* 2x textures for the screen bitmap */
bitmap_t * bitmap[2]; /* 2x bitmaps for rendering */
@ -324,9 +321,6 @@ void video_init(running_machine *machine)
/* allocate a timer to reset partial updates */
internal_state->scanline0_timer = timer_alloc(scanline0_callback, (void *)screen);
/* save some cross-reference information that makes our life easier */
internal_state->scrnum = scrnum;
/* configure the screen with the default parameters */
state->format = config->format;
video_screen_configure(screen, config->width, config->height, &config->visarea, config->refresh);
@ -379,17 +373,6 @@ void video_init(running_machine *machine)
/* reset video statics and get out of here */
pdrawgfx_shadow_lowpri = 0;
/* initialize tilemaps */
tilemap_init(machine);
/* create a render target for snapshots */
if (machine->screen[0].private_data != NULL)
{
global.snap_target = render_target_alloc(layout_snap, RENDER_CREATE_SINGLE_FILE | RENDER_CREATE_HIDDEN);
assert(global.snap_target != NULL);
render_target_set_layer_config(global.snap_target, 0);
}
/* start recording movie if specified */
filename = options_get_string(mame_options(), OPTION_MNGWRITE);
if ((filename[0] != 0) && (machine->primary_screen != NULL))
@ -828,7 +811,7 @@ void video_screen_update_partial(const device_config *screen, int scanline)
}
/* skip if this screen is not visible anywhere */
if (!(render_get_live_screens_mask() & (1 << internal_state->scrnum)))
if (!render_is_live_screen(screen))
{
LOG_PARTIAL_UPDATES(("skipped because screen not live\n"));
return;
@ -1458,21 +1441,19 @@ static int finish_screen_updates(running_machine *machine)
{
const device_config *screen;
int anything_changed = FALSE;
int livemask;
/* finish updating the screens */
for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen))
video_screen_update_partial(screen, video_screen_get_visible_area(screen)->max_y);
/* now add the quads for all the screens */
livemask = render_get_live_screens_mask();
for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen))
{
screen_state *state = get_safe_token(screen);
internal_screen_state *internal_state = (internal_screen_state *)state->private_data;
/* only update if live */
if (livemask & (1 << internal_state->scrnum))
if (render_is_live_screen(screen))
{
const screen_config *config = screen->inline_config;
@ -2062,19 +2043,16 @@ void video_screen_save_snapshot(const device_config *screen, mame_file *fp)
void video_save_active_screen_snapshots(running_machine *machine)
{
UINT32 screenmask = render_get_live_screens_mask();
mame_file *fp;
const device_config *screen;
int scrnum;
/* write one snapshot per visible screen */
for (screen = video_screen_first(machine->config), scrnum = 0; screen != NULL; screen = video_screen_next(screen), scrnum++)
if (screenmask & (1 << scrnum))
for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen))
if (render_is_live_screen(screen))
{
file_error filerr = mame_fopen_next(machine, SEARCHPATH_SCREENSHOT, "png", &fp);
if (filerr == FILERR_NONE)
{
const device_config *screen = device_list_find_by_index(machine->config->devicelist, VIDEO_SCREEN, scrnum);
video_screen_save_snapshot(screen, fp);
mame_fclose(fp);
}
@ -2090,36 +2068,40 @@ void video_save_active_screen_snapshots(running_machine *machine)
static void create_snapshot_bitmap(const device_config *screen)
{
screen_state *state = get_safe_token(screen);
internal_screen_state *internal_state = (internal_screen_state *)state->private_data;
const render_primitive_list *primlist;
INT32 width, height;
int view_index;
/* only do it, if there is at least one screen */
if (global.snap_target != NULL)
/* lazy create snap target */
if (global.snap_target == NULL)
{
/* select the appropriate view in our dummy target */
render_target_set_view(global.snap_target, internal_state->scrnum);
/* get the minimum width/height and set it on the target */
render_target_get_minimum_size(global.snap_target, &width, &height);
render_target_set_bounds(global.snap_target, width, height, 0);
/* if we don't have a bitmap, or if it's not the right size, allocate a new one */
if (global.snap_bitmap == NULL || width != global.snap_bitmap->width || height != global.snap_bitmap->height)
{
if (global.snap_bitmap != NULL)
bitmap_free(global.snap_bitmap);
global.snap_bitmap = bitmap_alloc(width, height, BITMAP_FORMAT_RGB32);
assert(global.snap_bitmap != NULL);
}
/* render the screen there */
primlist = render_target_get_primitives(global.snap_target);
osd_lock_acquire(primlist->lock);
rgb888_draw_primitives(primlist->head, global.snap_bitmap->base, width, height, global.snap_bitmap->rowpixels);
osd_lock_release(primlist->lock);
global.snap_target = render_target_alloc(layout_snap, RENDER_CREATE_SINGLE_FILE | RENDER_CREATE_HIDDEN);
assert(global.snap_target != NULL);
render_target_set_layer_config(global.snap_target, 0);
}
/* select the appropriate view in our dummy target */
view_index = device_list_index(screen->machine->config->devicelist, VIDEO_SCREEN, screen->tag);
render_target_set_view(global.snap_target, view_index);
/* get the minimum width/height and set it on the target */
render_target_get_minimum_size(global.snap_target, &width, &height);
render_target_set_bounds(global.snap_target, width, height, 0);
/* if we don't have a bitmap, or if it's not the right size, allocate a new one */
if ((global.snap_bitmap == NULL) || (width != global.snap_bitmap->width) || (height != global.snap_bitmap->height))
{
if (global.snap_bitmap != NULL)
bitmap_free(global.snap_bitmap);
global.snap_bitmap = bitmap_alloc(width, height, BITMAP_FORMAT_RGB32);
assert(global.snap_bitmap != NULL);
}
/* render the screen there */
primlist = render_target_get_primitives(global.snap_target);
osd_lock_acquire(primlist->lock);
rgb888_draw_primitives(primlist->head, global.snap_bitmap->base, width, height, global.snap_bitmap->rowpixels);
osd_lock_release(primlist->lock);
}

View File

@ -44,7 +44,7 @@
PALETTE_INIT( karnov );
VIDEO_UPDATE( karnov );
WRITE16_HANDLER( karnov_playfield_w );
WRITE16_HANDLER( karnov_playfield_swap_w );
WRITE16_HANDLER( karnov_videoram_w );
void karnov_flipscreen_w(int data);
@ -354,7 +354,8 @@ static ADDRESS_MAP_START( karnov_writemem, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x080000, 0x080fff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
AM_RANGE(0x0a0000, 0x0a07ff) AM_WRITE(karnov_videoram_w) AM_BASE(&videoram16)
AM_RANGE(0x0a0800, 0x0a0fff) AM_WRITE(karnov_videoram_w) /* Wndrplnt Mirror */
AM_RANGE(0x0a1000, 0x0a1fff) AM_WRITE(karnov_playfield_w) AM_BASE(&karnov_pf_data)
AM_RANGE(0x0a1000, 0x0a17ff) AM_WRITE(SMH_RAM) AM_BASE(&karnov_pf_data)
AM_RANGE(0x0a1800, 0x0a1fff) AM_WRITE(karnov_playfield_swap_w)
AM_RANGE(0x0c0000, 0x0c000f) AM_WRITE(karnov_control_w)
ADDRESS_MAP_END

View File

@ -107,8 +107,8 @@ VIDEO_START( fortyl )
fortyl_pixram1 = auto_malloc(0x4000);
fortyl_pixram2 = auto_malloc(0x4000);
pixel_bitmap1 = auto_bitmap_alloc(256,256,machine->screen[0].format);
pixel_bitmap2 = auto_bitmap_alloc(256,256,machine->screen[0].format);
pixel_bitmap1 = auto_bitmap_alloc(256,256,video_screen_get_format(machine->primary_screen));
pixel_bitmap2 = auto_bitmap_alloc(256,256,video_screen_get_format(machine->primary_screen));
background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8,8,64,32);

View File

@ -115,13 +115,10 @@ static TILE_GET_INFO( get_bg_tile_info )
VIDEO_START( airbustr )
{
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
16, 16, 32, 32);
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
16, 16, 32, 32);
sprites_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
sprites_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap_set_transparent_pen(fg_tilemap, 0);
pandora_start(1,0,0);

View File

@ -327,13 +327,13 @@ VIDEO_START( argus )
VIDEO_START( valtric )
{
/* info offset type w h col row */
bg1_tilemap = tilemap_create(valtric_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32);
tx_tilemap = tilemap_create(valtric_get_tx_tile_info, tilemap_scan_cols, 8, 8, 32, 32);
/* info offset w h col row */
bg1_tilemap = tilemap_create(valtric_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32);
tx_tilemap = tilemap_create(valtric_get_tx_tile_info, tilemap_scan_cols, 8, 8, 32, 32);
tilemap_set_transparent_pen( bg1_tilemap, 15 );
tilemap_set_transparent_pen( tx_tilemap, 15 );
mosaicbitmap=auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
mosaicbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
jal_blend_table = auto_malloc(0xc00);
memset(jal_blend_table,0,0xc00) ;
}

View File

@ -405,7 +405,7 @@ void atarimo_init(running_machine *machine, int map, const struct atarimo_desc *
mo->last_link = -1;
/* allocate the temp bitmap */
mo->bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
mo->bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
fillbitmap(mo->bitmap, desc->transpen, NULL);
/* allocate the spriteram */

View File

@ -35,8 +35,8 @@ VIDEO_START( battlera )
memset(sprite_dirty,1,0x400);
memset(vram_dirty,1,0x1000);
tile_bitmap=auto_bitmap_alloc(512,512,machine->screen[0].format);
front_bitmap=auto_bitmap_alloc(512,512,machine->screen[0].format);
tile_bitmap=auto_bitmap_alloc(512,512,video_screen_get_format(machine->primary_screen));
front_bitmap=auto_bitmap_alloc(512,512,video_screen_get_format(machine->primary_screen));
vram_ptr=0;
inc_value=1;

View File

@ -62,10 +62,10 @@ READ8_HANDLER( bigevglf_vidram_r )
VIDEO_START( bigevglf )
{
tmp_bitmap[0] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmp_bitmap[1] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmp_bitmap[2] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmp_bitmap[3] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmp_bitmap[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmp_bitmap[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmp_bitmap[2] = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmp_bitmap[3] = video_screen_auto_bitmap_alloc(machine->primary_screen);
vidram = auto_malloc(0x100*0x100 * 4);
}

View File

@ -25,7 +25,7 @@ static void bishi_tile_callback(int layer, int *code, int *color, int *flags)
VIDEO_START(bishi)
{
assert(machine->screen[0].format == BITMAP_FORMAT_RGB32);
assert(video_screen_get_format(machine->primary_screen) == BITMAP_FORMAT_RGB32);
K055555_vh_start();
K054338_vh_start();

View File

@ -247,8 +247,8 @@ static TILE_GET_INFO( get_tile_info )
VIDEO_START( bking )
{
bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
helper0 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper0 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -62,7 +62,7 @@ WRITE16_HANDLER( blockout_frontcolor_w )
VIDEO_START( blockout )
{
/* Allocate temporary bitmaps */
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -147,7 +147,10 @@ VIDEO_START( btime )
VIDEO_START( bnj )
{
/* the background area is twice as wide as the screen */
background_bitmap = auto_bitmap_alloc(2*machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
int width = video_screen_get_width(machine->primary_screen);
int height = video_screen_get_height(machine->primary_screen);
bitmap_format format = video_screen_get_format(machine->primary_screen);
background_bitmap = auto_bitmap_alloc(2*width, height, format);
VIDEO_START_CALL(btime);
}

View File

@ -29,8 +29,8 @@ PALETTE_INIT( buggychl )
VIDEO_START( buggychl )
{
dirtychar = auto_malloc(256 * sizeof(*dirtychar));
tmpbitmap1 = auto_bitmap_alloc(256,256,machine->screen[0].format);
tmpbitmap2 = auto_bitmap_alloc(256,256,machine->screen[0].format);
tmpbitmap1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmpbitmap2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
memset(dirtychar,0xff,256 * sizeof(*dirtychar));
}

View File

@ -160,13 +160,15 @@ PALETTE_INIT( carpolo )
VIDEO_START( carpolo )
{
sprite_sprite_collision_bitmap1 = auto_bitmap_alloc(SPRITE_WIDTH*2,SPRITE_HEIGHT*2,machine->screen[0].format);
sprite_sprite_collision_bitmap2 = auto_bitmap_alloc(SPRITE_WIDTH*2,SPRITE_HEIGHT*2,machine->screen[0].format);
bitmap_format format = video_screen_get_format(machine->primary_screen);
sprite_goal_collision_bitmap1 = auto_bitmap_alloc(SPRITE_WIDTH+GOAL_WIDTH,SPRITE_HEIGHT+GOAL_HEIGHT,machine->screen[0].format);
sprite_goal_collision_bitmap2 = auto_bitmap_alloc(SPRITE_WIDTH+GOAL_WIDTH,SPRITE_HEIGHT+GOAL_HEIGHT,machine->screen[0].format);
sprite_sprite_collision_bitmap1 = auto_bitmap_alloc(SPRITE_WIDTH*2, SPRITE_HEIGHT*2, format);
sprite_sprite_collision_bitmap2 = auto_bitmap_alloc(SPRITE_WIDTH*2, SPRITE_HEIGHT*2, format);
sprite_border_collision_bitmap = auto_bitmap_alloc(SPRITE_WIDTH,SPRITE_HEIGHT,machine->screen[0].format);
sprite_goal_collision_bitmap1 = auto_bitmap_alloc(SPRITE_WIDTH+GOAL_WIDTH, SPRITE_HEIGHT+GOAL_HEIGHT, format);
sprite_goal_collision_bitmap2 = auto_bitmap_alloc(SPRITE_WIDTH+GOAL_WIDTH, SPRITE_HEIGHT+GOAL_HEIGHT, format);
sprite_border_collision_bitmap = auto_bitmap_alloc(SPRITE_WIDTH, SPRITE_HEIGHT, format);
}

View File

@ -53,7 +53,7 @@ VIDEO_START( ccastles )
3, resistances, bweights, 1000, 0);
/* allocate a bitmap for drawing sprites */
spritebitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
spritebitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
/* register for savestates */
state_save_register_global_array(video_control);

View File

@ -42,10 +42,10 @@ VIDEO_START( changela )
memory_devices = auto_malloc(4 * 0x800); /* 0 - not connected, 1,2,3 - RAMs*/
tree_ram = auto_malloc(2 * 0x20);
obj0_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
river_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
tree0_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
tree1_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
obj0_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
river_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
tree0_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
tree1_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
changela_scanline_timer = timer_alloc(changela_scanline_callback, NULL);
timer_adjust_oneshot(changela_scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, 30, 0), 30);

View File

@ -54,7 +54,7 @@ VIDEO_START( cloud9 )
3, resistances, bweights, 1000, 0);
/* allocate a bitmap for drawing sprites */
spritebitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
spritebitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
/* register for savestates */
state_save_register_global_pointer(videoram, 0x8000);

View File

@ -189,9 +189,9 @@ VIDEO_START( cvs )
s2636_2 = s2636_config(cvs_s2636_2_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET);
/* create helper bitmaps */
background_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
scrolled_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
background_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
cvs_collision_background = video_screen_auto_bitmap_alloc(machine->primary_screen);
scrolled_collision_background = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -108,7 +108,7 @@ static TIMER_CALLBACK( dcheese_signal_irq_callback )
VIDEO_START( dcheese )
{
/* the destination bitmap is not directly accessible to the CPU */
dstbitmap = auto_bitmap_alloc(DSTBITMAP_WIDTH, DSTBITMAP_HEIGHT, machine->screen[0].format);
dstbitmap = auto_bitmap_alloc(DSTBITMAP_WIDTH, DSTBITMAP_HEIGHT, video_screen_get_format(machine->primary_screen));
/* create a timer */
blitter_timer = timer_alloc(blitter_scanline_callback, NULL);

View File

@ -221,7 +221,7 @@ VIDEO_START( dday )
text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,8,8,32,32);
sl_tilemap = tilemap_create(get_sl_tile_info, tilemap_scan_rows,8,8,32,32);
main_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
main_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap_set_transmask(bg_tilemap,0,0x00f0,0xff0f); /* pens 0-3 have priority over the foreground layer */

View File

@ -894,7 +894,7 @@ VIDEO_START( dkong )
switch (state->hardware_type)
{
case HARDWARE_TRS02:
state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
state->bg_bits = video_screen_auto_bitmap_alloc(machine->primary_screen);
state->scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust_oneshot(state->scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, 0, 0), 0);
/* fall through */
@ -907,7 +907,7 @@ VIDEO_START( dkong )
state->bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
tilemap_set_scrolldx(state->bg_tilemap, 0, 128);
state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
state->bg_bits = video_screen_auto_bitmap_alloc(machine->primary_screen);
state->scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust_oneshot(state->scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, 0, 0), 0);

View File

@ -85,7 +85,7 @@ VIDEO_START( dogfgt )
bitmapram = auto_malloc(BITMAPRAM_SIZE);
pixbitmap = auto_bitmap_alloc(256,256,machine->screen[0].format);
pixbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -63,8 +63,8 @@ READ32_HANDLER( eolith_vram_r )
VIDEO_START( eolith )
{
eo_vram = auto_malloc(0x40000*2);
bitmaps[0] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
bitmaps[1] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
bitmaps[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
bitmaps[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
}
VIDEO_UPDATE( eolith )

View File

@ -224,13 +224,13 @@ VIDEO_START( splndrbt )
UINT8 *buf8ptr;
int i;
assert(machine->screen[0].format == BITMAP_FORMAT_INDEXED16);
assert(video_screen_get_format(machine->primary_screen) == BITMAP_FORMAT_INDEXED16);
halfclip = machine->screen[0].visarea;
i = halfclip.max_y - halfclip.min_y + 1;
halfclip.max_y = halfclip.min_y + (i >> 1) - 1;
tmpbitmap = auto_bitmap_alloc(BMW, BMW, machine->screen[0].format);
tmpbitmap = auto_bitmap_alloc(BMW, BMW, video_screen_get_format(machine->primary_screen));
charmap0 = tilemap_create(splndrbt_char0info, tilemap_scan_cols, 8, 8, 32, 32);
tilemap_set_transparent_pen(charmap0, 0);

View File

@ -54,10 +54,12 @@ void exidy_video_config(UINT8 _collision_mask, UINT8 _collision_invert, int _is_
VIDEO_START( exidy )
{
background_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
motion_object_1_vid = auto_bitmap_alloc(16, 16, machine->screen[0].format);
motion_object_2_vid = auto_bitmap_alloc(16, 16, machine->screen[0].format);
motion_object_2_clip = auto_bitmap_alloc(16, 16, machine->screen[0].format);
bitmap_format format = video_screen_get_format(machine->primary_screen);
background_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
motion_object_1_vid = auto_bitmap_alloc(16, 16, format);
motion_object_2_vid = auto_bitmap_alloc(16, 16, format);
motion_object_2_clip = auto_bitmap_alloc(16, 16, format);
}

View File

@ -36,8 +36,8 @@ WRITE8_HANDLER( fgoal_xpos_w )
VIDEO_START( fgoal )
{
fgbitmap = auto_bitmap_alloc(256, 256, machine->screen[0].format);
bgbitmap = auto_bitmap_alloc(256, 256, machine->screen[0].format);
fgbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
bgbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -51,7 +51,7 @@ PALETTE_INIT( finalizr )
VIDEO_START( finalizr )
{
tmpbitmap = auto_bitmap_alloc(256,256,machine->screen[0].format);
tmpbitmap = auto_bitmap_alloc(256,256,video_screen_get_format(machine->primary_screen));
}

View File

@ -234,8 +234,8 @@ static TILE_GET_INFO( montecar_get_tile_info2 )
VIDEO_START( firetrk )
{
helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap1 = tilemap_create(firetrk_get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16);
tilemap2 = tilemap_create(firetrk_get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16);
@ -244,8 +244,8 @@ VIDEO_START( firetrk )
VIDEO_START( superbug )
{
helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap1 = tilemap_create(superbug_get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16);
tilemap2 = tilemap_create(superbug_get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16);
@ -254,8 +254,8 @@ VIDEO_START( superbug )
VIDEO_START( montecar )
{
helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap1 = tilemap_create(montecar_get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16);
tilemap2 = tilemap_create(montecar_get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16);

View File

@ -78,7 +78,7 @@ VIDEO_START( gaelco3d )
poly = poly_alloc(2000, sizeof(poly_extra_data), 0);
add_exit_callback(machine, gaelco3d_exit);
screenbits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
screenbits = video_screen_auto_bitmap_alloc(machine->primary_screen);
zbuffer = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);

View File

@ -1019,7 +1019,7 @@ VIDEO_START( dambustr )
draw_bullets = dambustr_draw_bullets;
/* allocate the temporary bitmap for the background priority */
dambustr_tmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
dambustr_tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
/* make a copy of the tilemap to emulate background priority */
dambustr_videoram2 = auto_malloc(0x0400);

View File

@ -9,8 +9,8 @@ static bitmap_t *sprites_bitmap;
VIDEO_START( galpanic )
{
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
sprites_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
sprites_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
pandora_start(0,0, -16);
}

View File

@ -133,7 +133,7 @@ VIDEO_START( glass )
{
pant[0] = tilemap_create(get_tile_info_glass_screen0,tilemap_scan_rows,16,16,32,32);
pant[1] = tilemap_create(get_tile_info_glass_screen1,tilemap_scan_rows,16,16,32,32);
screen_bitmap = auto_bitmap_alloc (320, 200, machine->screen[0].format);
screen_bitmap = auto_bitmap_alloc (320, 200, video_screen_get_format(machine->primary_screen));
tilemap_set_transparent_pen(pant[0],0);
tilemap_set_transparent_pen(pant[1],0);

View File

@ -29,10 +29,10 @@ VIDEO_START( goldstar )
// int i;
/* the background area is half as high as the screen */
tmpbitmap1 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap3 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap4 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmpbitmap2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmpbitmap3 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmpbitmap4 = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -119,7 +119,7 @@ VIDEO_START( gomoku )
int bgdata;
int color;
gomoku_bg_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
gomoku_bg_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32, 32);

View File

@ -108,7 +108,7 @@ VIDEO_START( grchamp )
{
grchamp_state *state = machine->driver_data;
state->work_bitmap = auto_bitmap_alloc(32,32,machine->screen[0].format);
state->work_bitmap = auto_bitmap_alloc(32,32,video_screen_get_format(machine->primary_screen));
/* allocate tilemaps for each of the three sections */
state->text_tilemap = tilemap_create(get_text_tile_info, tilemap_scan_rows, 8,8, 32,32);

View File

@ -181,8 +181,8 @@ void K001005_swap_buffers(void);
void K001005_init(void)
{
int i;
K001005_bitmap[0] = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, Machine->screen[0].format);
K001005_bitmap[1] = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, Machine->screen[0].format);
K001005_bitmap[0] = video_screen_auto_bitmap_alloc(Machine->primary_screen);
K001005_bitmap[1] = video_screen_auto_bitmap_alloc(Machine->primary_screen);
K001005_zbuffer = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED32);

View File

@ -232,7 +232,7 @@ void hyhoo_gfxdraw(void)
VIDEO_START( hyhoo )
{
hyhoo_tmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
hyhoo_tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -120,7 +120,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
VIDEO_START( ikki )
{
sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
sprite_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -182,7 +182,7 @@ void pandora_start(UINT8 region, int x, int y)
pandora_spriteram = auto_malloc(0x1000);
memset(pandora_spriteram,0x00, 0x1000);
pandora_sprites_bitmap = auto_bitmap_alloc(Machine->screen[0].width,Machine->screen[0].height,Machine->screen[0].format);
pandora_sprites_bitmap = video_screen_auto_bitmap_alloc(Machine->primary_screen);
pandora_clear_bitmap = 1;
}

View File

@ -141,7 +141,7 @@ VIDEO_START( kaneko16_1xVIEW2 )
kaneko16_tmap_3 = 0;
sprites_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
sprites_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
{
int dx, xdim = machine->screen[0].width;

View File

@ -6,7 +6,6 @@
#include "driver.h"
static UINT8 *dirty_f;
static bitmap_t *bitmap_f;
UINT16 karnov_scroll[2], *karnov_pf_data;
static tilemap *fix_tilemap;
@ -70,11 +69,7 @@ PALETTE_INIT( karnov )
void karnov_flipscreen_w(int data)
{
static int last_flip;
flipscreen=data;
if (flipscreen!=last_flip)
memset(dirty_f,1,0x800);
last_flip=flipscreen;
tilemap_set_flip(ALL_TILEMAPS,flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
}
@ -86,14 +81,11 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re
if (flipscreen) fx=fy=1; else fx=fy=0;
/* 1st area is stored along X-axis... */
mx=-1; my=0;
for (offs = 0;offs < 0x400; offs ++) {
mx++;
if (mx==32) {mx=0; my++;}
if (!dirty_f[offs]) continue; else dirty_f[offs]=0;
tile=karnov_pf_data[offs];
color = tile >> 12;
tile = tile&0x7ff;
@ -107,28 +99,6 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re
0,TRANSPARENCY_NONE,0);
}
/* 2nd area is stored along Y-axis... */
mx=0; my=-1;
for (offs = 0x400 ;offs < 0x800; offs ++) {
my++;
if (my==32) {my=0; mx++;}
if (!dirty_f[offs]) continue; else dirty_f[offs]=0;
tile=karnov_pf_data[offs];
color = tile >> 12;
tile=tile&0x7ff;
if (flipscreen)
drawgfx(bitmap_f,machine->gfx[1],tile,
color, fx, fy, 496-16*mx,496-16*my,
0,TRANSPARENCY_NONE,0);
else
drawgfx(bitmap_f,machine->gfx[1],tile,
color, fx, fy, 16*mx,16*my,
0,TRANSPARENCY_NONE,0);
}
if (!flipscreen) {
scrolly=-scrolly;
scrollx=-scrollx;
@ -224,10 +194,10 @@ WRITE16_HANDLER( karnov_videoram_w )
tilemap_mark_tile_dirty(fix_tilemap,offset);
}
WRITE16_HANDLER( karnov_playfield_w )
WRITE16_HANDLER( karnov_playfield_swap_w )
{
offset = ((offset & 0x1f) << 5) | ((offset & 0x3e0) >> 5);
COMBINE_DATA(&karnov_pf_data[offset]);
dirty_f[offset] = 1;
}
/******************************************************************************/
@ -235,10 +205,7 @@ WRITE16_HANDLER( karnov_playfield_w )
VIDEO_START( karnov )
{
/* Allocate bitmaps */
bitmap_f = auto_bitmap_alloc(512,512,machine->screen[0].format);
dirty_f=auto_malloc(0x800);
memset(dirty_f,1,0x800);
bitmap_f = auto_bitmap_alloc(512,512,video_screen_get_format(machine->primary_screen));
fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_rows,8,8,32,32);
@ -248,10 +215,7 @@ VIDEO_START( karnov )
VIDEO_START( wndrplnt )
{
/* Allocate bitmaps */
bitmap_f = auto_bitmap_alloc(512,512,machine->screen[0].format);
dirty_f=auto_malloc(0x800);
memset(dirty_f,1,0x800);
bitmap_f = auto_bitmap_alloc(512,512,video_screen_get_format(machine->primary_screen));
fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_cols,8,8,32,32);

View File

@ -323,7 +323,7 @@ static TILE_GET_INFO( mappy_get_tile_info )
VIDEO_START( superpac )
{
bg_tilemap = tilemap_create(superpac_get_tile_info,superpac_tilemap_scan,8,8,36,28);
sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
sprite_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[0], 31);

View File

@ -145,7 +145,7 @@ VIDEO_START( model3 )
poly = poly_alloc(4000, sizeof(poly_extra_data), 0);
add_exit_callback(machine, model3_exit);
bitmap3d = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
bitmap3d = video_screen_auto_bitmap_alloc(machine->primary_screen);
zbuffer = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED32);
m3_char_ram = auto_malloc(0x100000);

View File

@ -492,7 +492,7 @@ VIDEO_START( nbmj8891_1layer )
UINT8 *CLUT = memory_region(REGION_USER1);
int i;
nbmj8891_tmpbitmap0 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj8891_tmpbitmap0 = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj8891_videoram0 = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(char));
nbmj8891_palette = auto_malloc(0x200 * sizeof(char));
nbmj8891_clut = auto_malloc(0x800 * sizeof(char));
@ -505,8 +505,8 @@ VIDEO_START( nbmj8891_1layer )
VIDEO_START( nbmj8891_2layer )
{
nbmj8891_tmpbitmap0 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj8891_tmpbitmap1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj8891_tmpbitmap0 = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj8891_tmpbitmap1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj8891_videoram0 = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT8));
nbmj8891_videoram1 = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT8));
nbmj8891_palette = auto_malloc(0x200 * sizeof(UINT8));

View File

@ -297,7 +297,7 @@ static void nbmj8991_gfxdraw(void)
******************************************************************************/
VIDEO_START( nbmj8991 )
{
nbmj8991_tmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj8991_tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj8991_videoram = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT8));
nbmj8991_clut = auto_malloc(0x800 * sizeof(UINT8));
memset(nbmj8991_videoram, 0x00, (machine->screen[0].width * machine->screen[0].height * sizeof(UINT8)));

View File

@ -405,7 +405,7 @@ WRITE8_HANDLER( nbmj9195_clut_1_w ) { nbmj9195_clut_w(1, offset, data); }
******************************************************************************/
VIDEO_START( nbmj9195_1layer )
{
nbmj9195_tmpbitmap[0] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj9195_tmpbitmap[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj9195_videoram[0] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT16));
nbmj9195_palette = auto_malloc(0x200 * sizeof(UINT8));
nbmj9195_clut[0] = auto_malloc(0x1000 * sizeof(UINT8));
@ -417,8 +417,8 @@ VIDEO_START( nbmj9195_1layer )
VIDEO_START( nbmj9195_2layer )
{
nbmj9195_tmpbitmap[0] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj9195_tmpbitmap[1] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj9195_tmpbitmap[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj9195_tmpbitmap[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj9195_videoram[0] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT16));
nbmj9195_videoram[1] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT16));
nbmj9195_palette = auto_malloc(0x200 * sizeof(UINT8));
@ -433,8 +433,8 @@ VIDEO_START( nbmj9195_2layer )
VIDEO_START( nbmj9195_nb22090 )
{
nbmj9195_tmpbitmap[0] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj9195_tmpbitmap[1] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
nbmj9195_tmpbitmap[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj9195_tmpbitmap[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
nbmj9195_videoram[0] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT16));
nbmj9195_videoram[1] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT16));
nbmj9195_videoworkram[0] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(UINT16));

View File

@ -140,7 +140,7 @@ static void videoram_alloc(const running_machine* const machine, int const size)
memset(robokid_bg2_videoram, 0x00, size);
}
sp_bitmap = auto_bitmap_alloc (machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
sp_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}
VIDEO_START( ninjakd2 )

View File

@ -372,9 +372,9 @@ WRITE16_HANDLER( niyanpai_clutsel_2_w ) { niyanpai_clutsel_w(2, data); }
******************************************************************************/
VIDEO_START( niyanpai )
{
niyanpai_tmpbitmap[0] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
niyanpai_tmpbitmap[1] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
niyanpai_tmpbitmap[2] = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
niyanpai_tmpbitmap[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
niyanpai_tmpbitmap[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
niyanpai_tmpbitmap[2] = video_screen_auto_bitmap_alloc(machine->primary_screen);
niyanpai_videoram[0] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(short));
niyanpai_videoram[1] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(short));
niyanpai_videoram[2] = auto_malloc(machine->screen[0].width * machine->screen[0].height * sizeof(short));

View File

@ -295,7 +295,7 @@ VIDEO_START( ojankoy )
VIDEO_START( ojankoc )
{
ojankoc_tmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
ojankoc_tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
ojankohs_videoram = auto_malloc(0x8000);
ojankohs_paletteram = auto_malloc(0x20);
}

View File

@ -203,7 +203,7 @@ VIDEO_START( pacland )
{
int color;
fg_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
fg_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
fillbitmap(fg_bitmap, 0xffff, NULL);
bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,64,32);

View File

@ -155,17 +155,12 @@ WRITE8_HANDLER( paradise_pixmap_w )
VIDEO_START( paradise )
{
tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows,
8,8, 0x20,0x20 );
tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows,
8,8, 0x20,0x20 );
tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows,
8,8, 0x20,0x20 );
tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, 8,8, 0x20,0x20 );
tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, 8,8, 0x20,0x20 );
tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, 8,8, 0x20,0x20 );
/* pixmap */
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap_set_transparent_pen(tilemap_0,0x0f);
tilemap_set_transparent_pen(tilemap_1,0xff);

View File

@ -106,7 +106,7 @@ VIDEO_START( quasar )
s2636_2 = s2636_config(cvs_s2636_2_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET);
/* create helper bitmaps */
cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
cvs_collision_background = video_screen_auto_bitmap_alloc(machine->primary_screen);
}
VIDEO_UPDATE( quasar )

View File

@ -75,7 +75,7 @@ static bitmap_t *rawbitmap;
VIDEO_START( shangha3 )
{
rawbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
rawbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
if (shangha3_do_shadows)
{

View File

@ -51,9 +51,9 @@ static TILE_GET_INFO( get_tile_info )
VIDEO_START( sprint2 )
{
helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, 16, 8, 32, 32);
bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, 16, 8, 32, 32);
}

View File

@ -53,9 +53,9 @@ static TILE_GET_INFO( sprint4_tile_info )
VIDEO_START( sprint4 )
{
helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
playfield = tilemap_create(sprint4_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
playfield = tilemap_create(sprint4_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}

View File

@ -125,11 +125,11 @@ WRITE8_HANDLER( sprint8_video_ram_w )
VIDEO_START( sprint8 )
{
helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, 16, 8, 32, 32);
tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, 16, 8, 32, 32);
tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, 16, 8, 32, 32);
tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, 16, 8, 32, 32);
tilemap_set_scrolly(tilemap1, 0, +24);
tilemap_set_scrolly(tilemap2, 0, +24);

View File

@ -109,7 +109,7 @@ VIDEO_START( starshp1 )
val = (val << 1) | (bit & 1);
}
helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
}

View File

@ -122,7 +122,7 @@ VIDEO_START( system1 )
bg_dirtybuffer = auto_malloc(1024);
memset(bg_dirtybuffer,1,1024);
tmp_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmp_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
state_save_register_func_postload(system1_postload);
state_save_register_global(system1_background_memory);
@ -141,7 +141,7 @@ VIDEO_START( wbml )
wbml_paged_videoram = auto_malloc(0x4000); /* Allocate 16k for background banked ram */
memset(wbml_paged_videoram,0,0x4000);
tmp_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmp_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
system1_sprite_xoffset = 1+7*2;

View File

@ -224,7 +224,7 @@ VIDEO_START( taitojc )
taitojc_texture = auto_malloc(0x400000);
framebuffer = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
framebuffer = video_screen_auto_bitmap_alloc(machine->primary_screen);
zbuffer = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
}

View File

@ -207,8 +207,8 @@ VIDEO_START( taitosj )
for (i = 0; i < 3; i++)
{
taitosj_layer_bitmap[i] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
sprite_layer_collbitmap2[i] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
taitosj_layer_bitmap[i] = video_screen_auto_bitmap_alloc(machine->primary_screen);
sprite_layer_collbitmap2[i] = video_screen_auto_bitmap_alloc(machine->primary_screen);
}
sprite_sprite_collbitmap1 = auto_bitmap_alloc(32,32,machine->screen[0].format);

View File

@ -115,9 +115,9 @@ static TILE_GET_INFO( tank8_get_tile_info )
VIDEO_START( tank8 )
{
helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper3 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper1 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
helper3 = video_screen_auto_bitmap_alloc(machine->primary_screen);
tank8_tilemap = tilemap_create(tank8_get_tile_info, tilemap_scan_rows, 16, 16, 32, 32);

View File

@ -425,7 +425,7 @@ VIDEO_START( tceptor )
decode_sprite32(machine, REGION_GFX4);
/* allocate temp bitmaps */
temp_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
temp_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
namco_road_init(machine, gfx_index);

View File

@ -31,7 +31,7 @@ static TILE_GET_INFO( get_tile_info )
VIDEO_START( triplhnt )
{
helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, 16, 16, 16, 16);
}

View File

@ -52,9 +52,9 @@ static TILE_GET_INFO( ultratnk_tile_info )
VIDEO_START( ultratnk )
{
helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
playfield = tilemap_create(ultratnk_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
playfield = tilemap_create(ultratnk_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}

View File

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

View File

@ -125,7 +125,7 @@ VIDEO_START( wolfpack )
LFSR = auto_malloc(0x8000);
helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
for (i = 0; i < 0x8000; i++)
{

View File

@ -134,8 +134,8 @@ VIDEO_START( tinvader )
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
24, 24, 32, 32);
spritebitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
spritebitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
tmpbitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
}
static void draw_sprites(running_machine *machine, bitmap_t *bitmap)