diff options
author | Zsolt Vasvari <zsoltvas@mamedev.org> | 2008-03-02 02:38:20 +0000 |
---|---|---|
committer | Zsolt Vasvari <zsoltvas@mamedev.org> | 2008-03-02 02:38:20 +0000 |
commit | 807d71db768de57e47c39b56846f4cbaca64ed88 (patch) | |
tree | 7a46e5e3bf2e7561e2641219bcbb4791aa4c0030 | |
parent | 6ab989af82d544447778cf58c996d8c41f352039 (diff) |
Removes cpu_getcurrentframe() and replaces it with video_screen_get_frame_number(int scrnum)
Updates all callers
59 files changed, 102 insertions, 150 deletions
diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c index 7f0ef272752..3ac6250166d 100644 --- a/src/emu/cpuexec.c +++ b/src/emu/cpuexec.c @@ -99,8 +99,6 @@ struct _cpuexec_data /* general CPU variables */ static cpuexec_data cpu[MAX_CPU]; -static UINT32 current_frame; - static int cycles_running; static int cycles_stolen; @@ -206,7 +204,6 @@ void cpuexec_init(running_machine *machine) /* save some stuff in the default tag */ state_save_push_tag(0); - state_save_register_item("cpu", 0, current_frame); state_save_register_item("cpu", 0, watchdog_enabled); state_save_register_item("cpu", 0, watchdog_counter); state_save_pop_tag(); @@ -245,9 +242,6 @@ static void cpuexec_reset(running_machine *machine) /* then reset the CPU directly */ cpunum_reset(cpunum); } - - /* reset the globals */ - current_frame = 0; } @@ -859,17 +853,6 @@ int cpu_getiloops(void) } -/*------------------------------------------------- - cpu_getcurrentframe - return the current - frame count (deprecated) --------------------------------------------------*/ - -int cpu_getcurrentframe(void) -{ - return current_frame; -} - - /*************************************************************************** INTERNAL TIMING ***************************************************************************/ @@ -888,10 +871,6 @@ static void on_global_vblank(running_machine *machine, screen_state *screen, int if (machine->config->watchdog_vblank_count != 0 && --watchdog_counter == 0) watchdog_callback(machine, NULL, 0); } - - /* VBLANK ending - increment total frames */ - else - current_frame++; } diff --git a/src/emu/deprecat.h b/src/emu/deprecat.h index 5884d9efb23..9f25f95ae21 100644 --- a/src/emu/deprecat.h +++ b/src/emu/deprecat.h @@ -54,22 +54,6 @@ extern running_machine *Machine; /************************************* * - * Video timing - * - * These functions are no longer considered - * to be the authority on scanline timing. - * Please use the video_screen_* functions - * in video.c for newer drivers. - * - *************************************/ - -/* Returns the number of the video frame we are currently playing */ -int cpu_getcurrentframe(void); - - - -/************************************* - * * Core timing * *************************************/ diff --git a/src/emu/video.c b/src/emu/video.c index 1c47f7adf5b..82d6b4726c6 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -74,6 +74,7 @@ struct _internal_screen_info emu_timer * vblank_end_timer; /* timer to signal VBLANK end */ emu_timer * scanline0_timer; /* scanline 0 timer */ emu_timer * scanline_timer; /* scanline timer */ + UINT64 frame_number; /* the current frame number */ /* VBLANK callbacks */ int vbl_cb_count; /* # of callbacks installed */ @@ -354,6 +355,7 @@ void video_init(running_machine *machine) /* register for save states */ state_save_register_item("video", scrnum, info->vblank_time.seconds); state_save_register_item("video", scrnum, info->vblank_time.attoseconds); + state_save_register_item("video", scrnum, info->frame_number); } /* create spriteram buffers if necessary */ @@ -1048,6 +1050,18 @@ attotime video_screen_get_frame_period(int scrnum) } +/*------------------------------------------------- + video_screen_get_frame_number - return the + current frame number since the start of the + emulated machine +-------------------------------------------------*/ + +UINT64 video_screen_get_frame_number(int scrnum) +{ + internal_screen_info *info = get_screen_info(Machine, scrnum); + return info->frame_number; +} + /*------------------------------------------------- video_screen_register_vbl_cb - registers a @@ -1236,6 +1250,9 @@ static TIMER_CALLBACK( vblank_end_callback ) /* let any external parties know that the VBLANK is over */ call_vb_callbacks(machine, scrinfo, FALSE); + + /* increment the frame number counter */ + scrinfo->frame_number++; } diff --git a/src/emu/video.h b/src/emu/video.h index 08961c4c6b5..492ed861c60 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -142,6 +142,9 @@ attotime video_screen_get_scan_period(int scrnum); /* return the amount of time the beam takes to draw one complete frame */ attotime video_screen_get_frame_period(int scrnum); +/* return the current frame number -- this is always increasing */ +UINT64 video_screen_get_frame_number(int scrnum); + /* returns whether a given screen exists */ int video_screen_exists(int scrnum); diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c index 6eeef2540cd..4febaa4d2be 100644 --- a/src/mame/audio/cinemat.c +++ b/src/mame/audio/cinemat.c @@ -871,14 +871,14 @@ static void starcas_sound_w(UINT8 sound_val, UINT8 bits_changed) target_pitch = 0x10000 + (target_pitch << 12); /* once per frame slide the pitch toward the target */ - if (cpu_getcurrentframe() > last_frame) + if (video_screen_get_frame_number(0) > last_frame) { if (current_pitch > target_pitch) current_pitch -= 300; if (current_pitch < target_pitch) current_pitch += 200; sample_set_freq(4, current_pitch); - last_frame = cpu_getcurrentframe(); + last_frame = video_screen_get_frame_number(0); } /* remember the previous value */ @@ -974,7 +974,7 @@ static void solarq_sound_w(UINT8 sound_val, UINT8 bits_changed) target_volume = 0; /* ramp the thrust volume */ - if (sample_playing(2) && cpu_getcurrentframe() > last_frame) + if (sample_playing(2) && video_screen_get_frame_number(0) > last_frame) { if (current_volume > target_volume) current_volume -= 0.078f; @@ -984,7 +984,7 @@ static void solarq_sound_w(UINT8 sound_val, UINT8 bits_changed) sample_set_volume(2, current_volume); else sample_stop(2); - last_frame = cpu_getcurrentframe(); + last_frame = video_screen_get_frame_number(0); } /* fire - falling edge */ @@ -1251,14 +1251,14 @@ static void wotw_sound_w(UINT8 sound_val, UINT8 bits_changed) target_pitch = 0x10000 + (target_pitch << 12); /* once per frame slide the pitch toward the target */ - if (cpu_getcurrentframe() > last_frame) + if (video_screen_get_frame_number(0) > last_frame) { if (current_pitch > target_pitch) current_pitch -= 300; if (current_pitch < target_pitch) current_pitch += 200; sample_set_freq(4, current_pitch); - last_frame = cpu_getcurrentframe(); + last_frame = video_screen_get_frame_number(0); } /* remember the previous value */ @@ -1363,14 +1363,14 @@ static void wotwc_sound_w(UINT8 sound_val, UINT8 bits_changed) target_pitch = 0x10000 + (target_pitch << 12); /* once per frame slide the pitch toward the target */ - if (cpu_getcurrentframe() > last_frame) + if (video_screen_get_frame_number(0) > last_frame) { if (current_pitch > target_pitch) current_pitch -= 300; if (current_pitch < target_pitch) current_pitch += 200; sample_set_freq(4, current_pitch); - last_frame = cpu_getcurrentframe(); + last_frame = video_screen_get_frame_number(0); } /* remember the previous value */ diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 254023424e8..31b183b826d 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -104,7 +104,7 @@ static void draw_sprites(running_machine *machine,bitmap_t *bitmap,const rectang y = backfire_spriteram32[offs]&0xffff; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = backfire_spriteram32[offs+2]&0xffff; colour = (x >>9) & 0x1f; diff --git a/src/mame/drivers/bishjan.c b/src/mame/drivers/bishjan.c index 0ebe195a4e0..d2d56c5683b 100644 --- a/src/mame/drivers/bishjan.c +++ b/src/mame/drivers/bishjan.c @@ -208,7 +208,7 @@ static READ16_HANDLER( bishjan_unk_r ) (mame_rand(Machine) & 0x9800) | // bit 7 eeprom? (((bishjan_sel==0x12) ? 0x40:0x00) << 8) | // (mame_rand() & 0xff); -// (((cpu_getcurrentframe()%60)==0)?0x18:0x00); +// (((video_screen_get_frame_number(0)%60)==0)?0x18:0x00); 0x18; } @@ -228,7 +228,7 @@ static READ16_HANDLER( bishjan_input_r ) return (res << 8) | readinputport(3) | - ((bishjan_hopper && !(cpu_getcurrentframe()%10)) ? 0x00 : 0x04) // bit 2: hopper sensor + ((bishjan_hopper && !(video_screen_get_frame_number(0)%10)) ? 0x00 : 0x04) // bit 2: hopper sensor ; } diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index 56114ccb903..389fbd5ffb7 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -1241,7 +1241,7 @@ static VIDEO_UPDATE(cps3) if (current_ypos&0x200) current_ypos-=0x400; - //if ( (whichbpp) && (cpu_getcurrentframe() & 1)) continue; + //if ( (whichbpp) && (video_screen_get_frame_number(0) & 1)) continue; /* use the palette value from the main list or the sublists? */ if (whichpal) diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index 5885b7b2ad7..3d10d979102 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -10,7 +10,6 @@ the most protected of the DE102 games? */ #include "driver.h" -#include "deprecat.h" #include "cpu/m68000/m68000.h" #include "decocrpt.h" #include "deco16ic.h" @@ -63,7 +62,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; xsize = y&0x0800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index 57d811c6e28..31386c4f2ae 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -2931,7 +2931,7 @@ static UINT8 hgokou_hopper; static UINT8 hgokou_player_r(int player) { - UINT8 hopper_bit = ((hgokou_hopper && !(cpu_getcurrentframe()%10)) ? 0 : (1<<6)); + UINT8 hopper_bit = ((hgokou_hopper && !(video_screen_get_frame_number(0)%10)) ? 0 : (1<<6)); if (!(ddenlovr_select2 & 0x01)) return readinputport(player * 5 + 1) | hopper_bit; if (!(ddenlovr_select2 & 0x02)) return readinputport(player * 5 + 2) | hopper_bit; diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c index 0f796427e42..b9b2bc21072 100644 --- a/src/mame/drivers/deco156.c +++ b/src/mame/drivers/deco156.c @@ -74,7 +74,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram32[offs]&0xffff; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram32[offs+2]&0xffff; colour = (x >>9) & 0x1f; diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c index 7864c6131ba..b198cc98fa0 100644 --- a/src/mame/drivers/dunhuang.c +++ b/src/mame/drivers/dunhuang.c @@ -346,7 +346,7 @@ static WRITE8_HANDLER( dunhuang_input_w ) { dunhuang_input = data; } static READ8_HANDLER( dunhuang_service_r ) { return readinputport(5) - | ((dunhuang_hopper && !(cpu_getcurrentframe()%10)) ? 0x00 : 0x08) // bit 3: hopper sensor + | ((dunhuang_hopper && !(video_screen_get_frame_number(0)%10)) ? 0x00 : 0x08) // bit 3: hopper sensor | 0x80 // bit 7 low -> tiles block transferrer busy ; } diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index 725b999bb50..d034c0a2872 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -1079,7 +1079,7 @@ static READ8_HANDLER( htengoku_coin_r ) { case 0x00: return readinputport(0); case 0x01: return 0xff; //? - case 0x02: return 0xbf | ((htengoku_hopper && !(cpu_getcurrentframe()%10)) ? 0 : (1<<6));; // bit 7 = blitter busy, bit 6 = hopper + case 0x02: return 0xbf | ((htengoku_hopper && !(video_screen_get_frame_number(0)%10)) ? 0 : (1<<6));; // bit 7 = blitter busy, bit 6 = hopper case 0x03: return htengoku_coins; } logerror("%04x: coin_r with select = %02x\n",activecpu_get_pc(),htengoku_select); diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c index 4d3bdd2ad68..30119cd72c0 100644 --- a/src/mame/drivers/fantland.c +++ b/src/mame/drivers/fantland.c @@ -190,7 +190,7 @@ static READ8_HANDLER( borntofi_inputs_r ) x = readinputport(13 + offset * 2); y = readinputport(12 + offset * 2); - f = cpu_getcurrentframe(); + f = video_screen_get_frame_number(0); ret[offset] = (ret[offset] & 0x14) | (readinputport(2 + offset) & 0xc3); diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index 6adf9aa59c0..3f244e001bb 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -278,7 +278,7 @@ static WRITE8_HANDLER( marinedt_pf_w ) //if(data&0xf0) // logerror("pf:%02x %d\n",marinedt_pf); -//logerror("pd:%02x %d\n",marinedt_pd, cpu_getcurrentframe()); +//logerror("pd:%02x %d\n",marinedt_pd, video_screen_get_frame_number(0)); } diff --git a/src/mame/drivers/mcr3.c b/src/mame/drivers/mcr3.c index ee2997cbbb9..1a636c86207 100644 --- a/src/mame/drivers/mcr3.c +++ b/src/mame/drivers/mcr3.c @@ -423,7 +423,7 @@ static READ8_HANDLER( turbotag_ip2_r ) if (input_mux) return readinputportbytag("SSIO.IP2.ALT"); - return readinputportbytag("SSIO.IP2") + 5 * (cpu_getcurrentframe() & 1); + return readinputportbytag("SSIO.IP2") + 5 * (video_screen_get_frame_number(0) & 1); } diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c index c3ab1f2bd1e..8db6447edb1 100644 --- a/src/mame/drivers/mirage.c +++ b/src/mame/drivers/mirage.c @@ -52,7 +52,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index d4658cdbead..3d70426e6ae 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -483,7 +483,7 @@ static READ32_HANDLER(fifoctl_r) static READ32_HANDLER(videoctl_r) { - return (cpu_getcurrentframe() & 1)<<2; + return (video_screen_get_frame_number(0) & 1)<<2; } diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c index 0e37755ba1f..ea0814a29df 100644 --- a/src/mame/drivers/suna8.c +++ b/src/mame/drivers/suna8.c @@ -960,7 +960,7 @@ static WRITE8_HANDLER( sparkman_rombank_w ) static READ8_HANDLER( sparkman_c0a3_r ) { - return (cpu_getcurrentframe() & 1) ? 0x80 : 0; + return (video_screen_get_frame_number(0) & 1) ? 0x80 : 0; } static ADDRESS_MAP_START( sparkman_readmem, ADDRESS_SPACE_PROGRAM, 8 ) diff --git a/src/mame/drivers/unico.c b/src/mame/drivers/unico.c index fef2ba38bac..5e9065e8380 100644 --- a/src/mame/drivers/unico.c +++ b/src/mame/drivers/unico.c @@ -23,7 +23,6 @@ Year + Game PCB Notes ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "machine/eeprom.h" #include "unico.h" #include "sound/2151intf.h" @@ -135,7 +134,7 @@ static READ16_HANDLER( unico_gunx_0_msb_r ) if (x<0x160) x=0x30 + (x*0xd0/0x15f); else x=((x-0x160) * 0x20)/0x1f; - return ((x&0xff) ^ (cpu_getcurrentframe()&1))<<8; + return ((x&0xff) ^ (video_screen_get_frame_number(0)&1))<<8; } static READ16_HANDLER( unico_guny_0_msb_r ) @@ -144,7 +143,7 @@ static READ16_HANDLER( unico_guny_0_msb_r ) y=0x18+((y*0xe0)/0xff); - return ((y&0xff) ^ (cpu_getcurrentframe()&1))<<8; + return ((y&0xff) ^ (video_screen_get_frame_number(0)&1))<<8; } static READ16_HANDLER( unico_gunx_1_msb_r ) @@ -155,7 +154,7 @@ static READ16_HANDLER( unico_gunx_1_msb_r ) if (x<0x160) x=0x30 + (x*0xd0/0x15f); else x=((x-0x160) * 0x20)/0x1f; - return ((x&0xff) ^ (cpu_getcurrentframe()&1))<<8; + return ((x&0xff) ^ (video_screen_get_frame_number(0)&1))<<8; } static READ16_HANDLER( unico_guny_1_msb_r ) @@ -164,7 +163,7 @@ static READ16_HANDLER( unico_guny_1_msb_r ) y=0x18+((y*0xe0)/0xff); - return ((y&0xff) ^ (cpu_getcurrentframe()&1))<<8; + return ((y&0xff) ^ (video_screen_get_frame_number(0)&1))<<8; } static ADDRESS_MAP_START( readmem_zeropnt, ADDRESS_SPACE_PROGRAM, 16 ) diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index f9fc19340f6..ce3145ddc30 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -153,7 +153,7 @@ static void xexex_objdma(int limiter) UINT16 *src, *dst; counter = frame; - frame = cpu_getcurrentframe(); + frame = video_screen_get_frame_number(0); if (limiter && counter == frame) return; // make sure we only do DMA transfer once per frame K053247_export_config(&dst, 0, 0, 0, &counter); diff --git a/src/mame/machine/namcoio.c b/src/mame/machine/namcoio.c index 9309c8fe3c9..15435b2845b 100644 --- a/src/mame/machine/namcoio.c +++ b/src/mame/machine/namcoio.c @@ -351,7 +351,7 @@ static UINT8 namcoio_51XX_read(int chip) if (io[chip].mode == 1) { - int on = (cpu_getcurrentframe() & 0x10) >> 4; + int on = (video_screen_get_frame_number(0) & 0x10) >> 4; if (io[chip].credits >= 2) WRITE_PORT(0,0x0c | 3*on); // lamps diff --git a/src/mame/video/actfancr.c b/src/mame/video/actfancr.c index 8faa3732e90..9c9c075977c 100644 --- a/src/mame/video/actfancr.c +++ b/src/mame/video/actfancr.c @@ -5,7 +5,6 @@ *******************************************************************************/ #include "driver.h" -#include "deprecat.h" static UINT8 actfancr_control_1[0x20],actfancr_control_2[0x20]; @@ -175,7 +174,7 @@ VIDEO_UPDATE( actfancr ) x = buffered_spriteram[offs+4]+(buffered_spriteram[offs+5]<<8); colour = ((x & 0xf000) >> 12); flash=x&0x800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; fx = y & 0x2000; fy = y & 0x4000; @@ -260,7 +259,7 @@ VIDEO_UPDATE( triothep ) x = buffered_spriteram[offs+4]+(buffered_spriteram[offs+5]<<8); colour = ((x & 0xf000) >> 12); flash=x&0x800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; fx = y & 0x2000; fy = y & 0x4000; diff --git a/src/mame/video/amiga.c b/src/mame/video/amiga.c index 28063abd26b..343966af8fc 100644 --- a/src/mame/video/amiga.c +++ b/src/mame/video/amiga.c @@ -921,7 +921,7 @@ void amiga_render_scanline(bitmap_t *bitmap, int scanline) } #if 0 - if ( cpu_getcurrentframe() % 64 == 0 && scanline == 100 ) + if ( video_screen_get_frame_number(0) % 64 == 0 && scanline == 100 ) { const char *m_lores = "LORES"; const char *m_hires = "HIRES"; @@ -960,7 +960,7 @@ void amiga_render_scanline(bitmap_t *bitmap, int scanline) CUSTOM_REG(REG_COLOR00) = save_color0; #if GUESS_COPPER_OFFSET - if (cpu_getcurrentframe() % 64 == 0 && scanline == 0) + if (video_screen_get_frame_number(0) % 64 == 0 && scanline == 0) { if (input_code_pressed(KEYCODE_Q)) popmessage("%d", wait_offset -= 1); diff --git a/src/mame/video/astrocde.c b/src/mame/video/astrocde.c index 0c4359772d5..2c6dde7b738 100644 --- a/src/mame/video/astrocde.c +++ b/src/mame/video/astrocde.c @@ -5,12 +5,9 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "cpu/z80/z80.h" #include "includes/astrocde.h" #include "sound/astrocde.h" -#include <math.h> /* for sin() and cos() */ -#include "osd_cpu.h" #include "video/resnet.h" @@ -312,7 +309,7 @@ VIDEO_UPDATE( astrocde ) /* compute the starting point of sparkle for the current frame */ if (astrocade_video_config & AC_STARS) - sparklebase = ((UINT64)cpu_getcurrentframe() * (UINT64)(machine->screen[0].width * machine->screen[0].height)) % RNG_PERIOD; + sparklebase = (video_screen_get_frame_number(0) * (UINT64)(machine->screen[0].width * machine->screen[0].height)) % RNG_PERIOD; /* iterate over scanlines */ for (y = cliprect->min_y; y <= cliprect->max_y; y++) diff --git a/src/mame/video/boogwing.c b/src/mame/video/boogwing.c index 5e7643e3d92..7c0c56bb74d 100644 --- a/src/mame/video/boogwing.c +++ b/src/mame/video/boogwing.c @@ -1,5 +1,4 @@ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect, UINT16* spriteram_base, int gfx_region) @@ -17,7 +16,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram_base[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram_base[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c index f006d197d35..57e97c2b72d 100644 --- a/src/mame/video/bwing.c +++ b/src/mame/video/bwing.c @@ -118,7 +118,7 @@ WRITE8_HANDLER( bwing_scrollreg_w ) } #if BW_DEBUG - logerror("(%1d)%04x: w=%02x a=%04x f=%d\n",cpu_getactivecpu(),activecpu_get_pc(),data,0x1b00+offset,cpu_getcurrentframe()); + logerror("(%1d)%04x: w=%02x a=%04x f=%d\n",cpu_getactivecpu(),activecpu_get_pc(),data,0x1b00+offset,video_screen_get_frame_number(0)); #endif break; } diff --git a/src/mame/video/cbuster.c b/src/mame/video/cbuster.c index b3c6bd68fd3..5f79df0e946 100644 --- a/src/mame/video/cbuster.c +++ b/src/mame/video/cbuster.c @@ -87,7 +87,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (x&0x2000) colour+=64; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; fx = y & 0x2000; fy = y & 0x4000; diff --git a/src/mame/video/cninja.c b/src/mame/video/cninja.c index 7ce905e3442..d992e7d3b5e 100644 --- a/src/mame/video/cninja.c +++ b/src/mame/video/cninja.c @@ -5,7 +5,6 @@ ****************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" #include "cninja.h" @@ -174,7 +173,7 @@ static void cninja_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons y = buffered_spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; colour = (x >> 9) &0x1f; fx = y & 0x2000; @@ -242,7 +241,7 @@ static void robocop2_draw_sprites(running_machine *machine, bitmap_t *bitmap, co y = buffered_spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; colour = (x >> 9) &0x1f; fx = y & 0x2000; @@ -340,7 +339,7 @@ static void mutantf_draw_sprites(running_machine *machine, bitmap_t *bitmap, con w = (spriteptr[offs+2]&0x0f00)>> 8; sy = spriteptr[offs]; - if ((sy&0x2000) && (cpu_getcurrentframe() & 1)) { + if ((sy&0x2000) && (video_screen_get_frame_number(0) & 1)) { offs+=inc; continue; } diff --git a/src/mame/video/cosmic.c b/src/mame/video/cosmic.c index 520e859f74c..1a06ec8d04e 100644 --- a/src/mame/video/cosmic.c +++ b/src/mame/video/cosmic.c @@ -7,7 +7,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" static pen_t (*map_color)(UINT8 x, UINT8 y); @@ -334,9 +333,9 @@ static void cosmica_draw_starfield(bitmap_t *bitmap, const rectangle *cliprect) int hc, hb_; if (flip_screen_get()) - x1 = x - cpu_getcurrentframe(); + x1 = x - video_screen_get_frame_number(0); else - x1 = x + cpu_getcurrentframe(); + x1 = x + video_screen_get_frame_number(0); hc = (x1 >> 2) & 0x01; hb_ = (x >> 5) & 0x01; /* not a bug, this one is the real x */ @@ -425,7 +424,7 @@ static void devzone_draw_grid(bitmap_t *bitmap, const rectangle *cliprect) static void nomnlnd_draw_background(bitmap_t *bitmap, const rectangle *cliprect) { UINT8 y = 0; - UINT8 water = cpu_getcurrentframe(); + UINT8 water = video_screen_get_frame_number(0); UINT8 *PROM = memory_region(REGION_USER2); /* all positioning is via logic gates: diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index 976529a2500..fb3b6168ce1 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -177,7 +177,6 @@ The games seem to use them to mark platforms, kill zones and no-go areas. ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "cps1.h" #define VERBOSE 0 @@ -1722,7 +1721,7 @@ static void cps1_render_stars(bitmap_t *bitmap,const rectangle *cliprect) sy = 255 - sy; } - col = ((col & 0xe0) >> 1) + (cpu_getcurrentframe()/16 & 0x0f); + col = ((col & 0xe0) >> 1) + (video_screen_get_frame_number(0)/16 & 0x0f); if (sx >= cliprect->min_x && sx <= cliprect->max_x && sy >= cliprect->min_y && sy <= cliprect->max_y) @@ -1748,7 +1747,7 @@ static void cps1_render_stars(bitmap_t *bitmap,const rectangle *cliprect) sy = 255 - sy; } - col = ((col & 0xe0) >> 1) + (cpu_getcurrentframe()/16 & 0x0f); + col = ((col & 0xe0) >> 1) + (video_screen_get_frame_number(0)/16 & 0x0f); if (sx >= cliprect->min_x && sx <= cliprect->max_x && sy >= cliprect->min_y && sy <= cliprect->max_y) diff --git a/src/mame/video/crospang.c b/src/mame/video/crospang.c index db0c87c7ba0..75f115e97be 100644 --- a/src/mame/video/crospang.c +++ b/src/mame/video/crospang.c @@ -10,7 +10,6 @@ */ #include "driver.h" -#include "deprecat.h" static int xsproff, ysproff; // sprite offsets static tilemap *bg_layer,*fg_layer; @@ -140,7 +139,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0xf; diff --git a/src/mame/video/darkseal.c b/src/mame/video/darkseal.c index 20db70125c7..66f58691879 100644 --- a/src/mame/video/darkseal.c +++ b/src/mame/video/darkseal.c @@ -179,7 +179,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta x = buffered_spriteram16[offs+2]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; colour = (x >> 9) &0x1f; diff --git a/src/mame/video/dassault.c b/src/mame/video/dassault.c index c04bafeb61c..f00dfc73428 100644 --- a/src/mame/video/dassault.c +++ b/src/mame/video/dassault.c @@ -5,7 +5,6 @@ ****************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" /******************************************************************************/ @@ -46,7 +45,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta y = spritebase[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; colour = (x >> 9) &0x1f; if (y&0x8000) colour+=32; diff --git a/src/mame/video/dec0.c b/src/mame/video/dec0.c index 16fc7e81a15..34410247f67 100644 --- a/src/mame/video/dec0.c +++ b/src/mame/video/dec0.c @@ -164,7 +164,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan if ((colour & pri_mask) != pri_val) continue; flash=x&0x800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; fx = y & 0x2000; fy = y & 0x4000; diff --git a/src/mame/video/dec8.c b/src/mame/video/dec8.c index 0246f5c9273..a7ac9975799 100644 --- a/src/mame/video/dec8.c +++ b/src/mame/video/dec8.c @@ -319,7 +319,7 @@ static void draw_sprites2(running_machine* machine, bitmap_t *bitmap, const rect x = buffered_spriteram[offs+5]+(buffered_spriteram[offs+4]<<8); colour = ((x & 0xf000) >> 12); flash=x&0x800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; if (priority==1 && (colour&4)) continue; if (priority==2 && !(colour&4)) continue; diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c index 156e9cc17b3..8e339b1c5f4 100644 --- a/src/mame/video/deco32.c +++ b/src/mame/video/deco32.c @@ -232,7 +232,7 @@ static void captaven_draw_sprites(running_machine* machine, bitmap_t *bitmap, co sx = spritedata[offs+1]; - if ((sy&0x2000) && (cpu_getcurrentframe() & 1)) continue; + if ((sy&0x2000) && (video_screen_get_frame_number(0) & 1)) continue; colour = (spritedata[offs+2] >>0) & 0x1f; @@ -291,7 +291,7 @@ static void fghthist_draw_sprites(running_machine* machine, bitmap_t *bitmap, co y = spritedata[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; trans=TRANSPARENCY_PEN; x = spritedata[offs+2]; @@ -407,7 +407,7 @@ static void nslasher_draw_sprites(running_machine* machine, bitmap_t *bitmap, co y = spritedata[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; trans=TRANSPARENCY_PEN; x = spritedata[offs+2]; diff --git a/src/mame/video/deco_mlc.c b/src/mame/video/deco_mlc.c index ae98f92fb36..fb233e3c5a7 100644 --- a/src/mame/video/deco_mlc.c +++ b/src/mame/video/deco_mlc.c @@ -252,7 +252,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan { if ((mlc_spriteram[offs+0]&0x8000)==0) continue; - if ((mlc_spriteram[offs+1]&0x2000) && (cpu_getcurrentframe() & 1)) + if ((mlc_spriteram[offs+1]&0x2000) && (video_screen_get_frame_number(0) & 1)) continue; /* diff --git a/src/mame/video/dietgo.c b/src/mame/video/dietgo.c index 2578f3e9589..6dc156019db 100644 --- a/src/mame/video/dietgo.c +++ b/src/mame/video/dietgo.c @@ -1,5 +1,4 @@ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectangle *cliprect) @@ -15,7 +14,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/diverboy.c b/src/mame/video/diverboy.c index 56021e86534..7e61860832d 100644 --- a/src/mame/video/diverboy.c +++ b/src/mame/video/diverboy.c @@ -1,7 +1,6 @@ /* Diver Boy - Video Hardware */ #include "driver.h" -#include "deprecat.h" UINT16 *diverboy_spriteram; size_t diverboy_spriteram_size; @@ -32,7 +31,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta bank = (source[1]&0x0002) >> 1; - if (!flash || (cpu_getcurrentframe() & 1)) + if (!flash || (video_screen_get_frame_number(0) & 1)) { drawgfx(bitmap,machine->gfx[bank], number, diff --git a/src/mame/video/funkyjet.c b/src/mame/video/funkyjet.c index 4b222e00fc6..c2a102cb789 100644 --- a/src/mame/video/funkyjet.c +++ b/src/mame/video/funkyjet.c @@ -5,7 +5,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" /******************************************************************************/ @@ -27,7 +26,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/gaiden.c b/src/mame/video/gaiden.c index fe47e8b8303..b9e299c83c0 100644 --- a/src/mame/video/gaiden.c +++ b/src/mame/video/gaiden.c @@ -5,7 +5,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" UINT16 *gaiden_videoram,*gaiden_videoram2,*gaiden_videoram3; int gaiden_sprite_sizey; @@ -317,7 +316,7 @@ static void gaiden_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons int ypos = source[3] & 0x01ff; int xpos = source[4] & 0x01ff; - if ((attributes & 0x20) && (cpu_getcurrentframe() & 1)) + if ((attributes & 0x20) && (video_screen_get_frame_number(0) & 1)) goto skip_sprite; color = (color >> 4) & 0x0f; diff --git a/src/mame/video/galspnbl.c b/src/mame/video/galspnbl.c index 93ab3ada5fc..d1a133b6384 100644 --- a/src/mame/video/galspnbl.c +++ b/src/mame/video/galspnbl.c @@ -1,5 +1,4 @@ #include "driver.h" -#include "deprecat.h" UINT16 *galspnbl_bgvideoram; @@ -56,7 +55,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int col,row; attr = spriteram16[offs]; - if ((attr & 0x0004) && ((attr & 0x0040) == 0 || (cpu_getcurrentframe() & 1)) + if ((attr & 0x0004) && ((attr & 0x0040) == 0 || (video_screen_get_frame_number(0) & 1)) // && ((attr & 0x0030) >> 4) == priority) && ((attr & 0x0020) >> 5) == priority) { diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c index 7d77c8e9a07..0a31de37df6 100644 --- a/src/mame/video/konamiic.c +++ b/src/mame/video/konamiic.c @@ -1149,7 +1149,6 @@ Registers (word-wise): ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "video/konamiic.h" #define VERBOSE 0 @@ -7466,7 +7465,7 @@ void K053250_dma(int chip, int limiter) chip_ptr = &K053250_info.chip[chip]; - current_frame = cpu_getcurrentframe(); + current_frame = video_screen_get_frame_number(0); last_frame = chip_ptr->frame; if (limiter && current_frame == last_frame) return; // make sure we only do DMA transfer once per frame diff --git a/src/mame/video/lemmings.c b/src/mame/video/lemmings.c index c2640135700..a218f7c1b93 100644 --- a/src/mame/video/lemmings.c +++ b/src/mame/video/lemmings.c @@ -13,7 +13,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "lemmings.h" UINT16 *lemmings_pixel_0_data,*lemmings_pixel_1_data,*lemmings_vram_data,*lemmings_control_data; @@ -39,7 +38,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = spritedata[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spritedata[offs+2]; colour = (x >>9) & 0xf; diff --git a/src/mame/video/madmotor.c b/src/mame/video/madmotor.c index b2b08432192..ed066830c1f 100644 --- a/src/mame/video/madmotor.c +++ b/src/mame/video/madmotor.c @@ -7,7 +7,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" UINT16 *madmotor_pf1_rowscroll; UINT16 *madmotor_pf1_data,*madmotor_pf2_data,*madmotor_pf3_data; @@ -244,7 +243,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (y = 0;y < h;y++) { if ((color & pri_mask) == pri_val && - (!flash || (cpu_getcurrentframe() & 1))) + (!flash || (video_screen_get_frame_number(0) & 1))) drawgfx(bitmap,machine->gfx[3], code - y * incy + h * x, color, diff --git a/src/mame/video/model1.c b/src/mame/video/model1.c index 4896681416c..ea57a2738b6 100644 --- a/src/mame/video/model1.c +++ b/src/mame/video/model1.c @@ -1,5 +1,4 @@ #include "driver.h" -#include "deprecat.h" #include "video/segaic24.h" #define LOG_TGP_VIDEO 0 @@ -1154,7 +1153,7 @@ static int get_list_number(void) static void end_frame(void) { - if((listctl[0] & 4) && (cpu_getcurrentframe() & 1)) + if((listctl[0] & 4) && (video_screen_get_frame_number(0) & 1)) listctl[0] ^= 0x40; } diff --git a/src/mame/video/n8080.c b/src/mame/video/n8080.c index aba3a781fef..7aa7ee2c97e 100644 --- a/src/mame/video/n8080.c +++ b/src/mame/video/n8080.c @@ -5,7 +5,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "includes/n8080.h" int spacefev_red_screen; @@ -194,7 +193,7 @@ VIDEO_UPDATE( spacefev ) 6, /* cyan */ }; - int cycle = cpu_getcurrentframe() / 32; + int cycle = video_screen_get_frame_number(0) / 32; color = ufo_color[cycle % 6]; } @@ -369,7 +368,7 @@ VIDEO_UPDATE( helifire ) VIDEO_EOF( helifire ) { - int n = (cpu_getcurrentframe() >> 1) % sizeof helifire_LSFR; + int n = (video_screen_get_frame_number(0) >> 1) % sizeof helifire_LSFR; int i; @@ -386,7 +385,7 @@ VIDEO_EOF( helifire ) G |= B; } - if (cpu_getcurrentframe() & 0x04) + if (video_screen_get_frame_number(0) & 0x04) { R |= G; } diff --git a/src/mame/video/pktgaldx.c b/src/mame/video/pktgaldx.c index 94427b7e36a..77381227813 100644 --- a/src/mame/video/pktgaldx.c +++ b/src/mame/video/pktgaldx.c @@ -1,5 +1,4 @@ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" UINT16* pcktgaldb_fgram; @@ -20,7 +19,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/rohga.c b/src/mame/video/rohga.c index 723bde4196a..bd6989f0fdd 100644 --- a/src/mame/video/rohga.c +++ b/src/mame/video/rohga.c @@ -5,7 +5,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" static UINT16 * rohga_spriteram; @@ -92,7 +91,7 @@ static void rohga_draw_sprites(running_machine *machine, bitmap_t *bitmap, const y = spriteptr[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; // Sprite colour is different between Rohga (6bpp) and Schmeisr (4bpp plus wire mods on pcb) if (is_schmeisr) @@ -191,7 +190,7 @@ static void wizdfire_draw_sprites(running_machine *machine, bitmap_t *bitmap, co y = spriteptr[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; colour = (x >> 9) &0x1f; if (bank==4 && colour&0x10) { @@ -298,7 +297,7 @@ Sprites 2: w = (spriteptr[offs+2]&0x0f00)>> 8; sy = spriteptr[offs]; - if ((sy&0x2000) && (cpu_getcurrentframe() & 1)) { + if ((sy&0x2000) && (video_screen_get_frame_number(0) & 1)) { offs+=inc; continue; } diff --git a/src/mame/video/simpl156.c b/src/mame/video/simpl156.c index 42c0178561b..2803f82202b 100644 --- a/src/mame/video/simpl156.c +++ b/src/mame/video/simpl156.c @@ -3,7 +3,6 @@ */ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" /* @@ -51,7 +50,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram32[offs]&0xffff; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram32[offs+2]&0xffff; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/sshangha.c b/src/mame/video/sshangha.c index f75745822b2..edfd92b419a 100644 --- a/src/mame/video/sshangha.c +++ b/src/mame/video/sshangha.c @@ -71,7 +71,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = spritesrc[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spritesrc[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/stadhero.c b/src/mame/video/stadhero.c index 21208c78cba..dbba0e36811 100644 --- a/src/mame/video/stadhero.c +++ b/src/mame/video/stadhero.c @@ -10,7 +10,6 @@ ***************************************************************************/ #include "driver.h" -#include "deprecat.h" UINT16 *stadhero_pf1_data; static UINT16 *stadhero_pf2_data; @@ -37,7 +36,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if ((colour & pri_mask) != pri_val) continue; flash=x&0x800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; fx = y & 0x2000; fy = y & 0x4000; diff --git a/src/mame/video/supbtime.c b/src/mame/video/supbtime.c index 089db5b17c2..2d873fa8b5e 100644 --- a/src/mame/video/supbtime.c +++ b/src/mame/video/supbtime.c @@ -13,7 +13,6 @@ End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimj) ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" /******************************************************************************/ @@ -31,7 +30,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/tank8.c b/src/mame/video/tank8.c index 33b1c348456..55c97e9f276 100644 --- a/src/mame/video/tank8.c +++ b/src/mame/video/tank8.c @@ -5,8 +5,7 @@ Atari Tank 8 video emulation ***************************************************************************/ #include "driver.h" -#include "deprecat.h" -#include "includes/tank8.h" +#include "tank8.h" UINT8 *tank8_video_ram; @@ -235,7 +234,7 @@ VIDEO_EOF( tank8 ) const UINT16* p2 = BITMAP_ADDR16(helper2, y, 0); const UINT16* p3 = BITMAP_ADDR16(helper3, y, 0); - if (y % 2 != cpu_getcurrentframe() % 2) + if (y % 2 != video_screen_get_frame_number(0) % 2) continue; /* video display is interlaced */ for (x = clip->min_x; x <= clip->max_x; x++) diff --git a/src/mame/video/tceptor.c b/src/mame/video/tceptor.c index 5138f7241ae..4feb48e1c76 100644 --- a/src/mame/video/tceptor.c +++ b/src/mame/video/tceptor.c @@ -4,7 +4,6 @@ */ #include "driver.h" -#include "deprecat.h" #include "namcoic.h" #define TX_TILE_OFFSET_CENTER (32 * 2) @@ -562,7 +561,7 @@ VIDEO_UPDATE( tceptor ) if (screen) { - int frame = cpu_getcurrentframe(); + int frame = video_screen_get_frame_number(screen); if ((frame & 1) == 1 && screen == 1) return UPDATE_HAS_NOT_CHANGED; diff --git a/src/mame/video/tumbleb.c b/src/mame/video/tumbleb.c index 07e0a1da7b6..a445f305c88 100644 --- a/src/mame/video/tumbleb.c +++ b/src/mame/video/tumbleb.c @@ -15,7 +15,6 @@ to switch between 8*8 tiles and 16*16 tiles. ***************************************************************************/ #include "driver.h" -#include "deprecat.h" static UINT16 tumblepb_control_0[8]; UINT16 *tumblepb_pf1_data,*tumblepb_pf2_data; @@ -43,7 +42,7 @@ static void tumblepb_draw_sprites(running_machine *machine, bitmap_t *bitmap,con y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0xf; @@ -105,7 +104,7 @@ static void jumpkids_draw_sprites(running_machine *machine, bitmap_t *bitmap,con y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0xf; @@ -167,7 +166,7 @@ static void fncywld_draw_sprites(running_machine *machine, bitmap_t *bitmap,cons y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x3f; diff --git a/src/mame/video/tumblep.c b/src/mame/video/tumblep.c index 2eed3d7ac47..867ec8fcc4f 100644 --- a/src/mame/video/tumblep.c +++ b/src/mame/video/tumblep.c @@ -14,7 +14,6 @@ to switch between 8*8 tiles and 16*16 tiles. ***************************************************************************/ #include "driver.h" -#include "deprecat.h" #include "deco16ic.h" static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect) @@ -30,7 +29,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = spriteram16[offs]; flash=y&0x1000; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; x = spriteram16[offs+2]; colour = (x >>9) & 0x1f; diff --git a/src/mame/video/vaportra.c b/src/mame/video/vaportra.c index ea1deaee069..8f22c003cc6 100644 --- a/src/mame/video/vaportra.c +++ b/src/mame/video/vaportra.c @@ -98,7 +98,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (!pri && !(colour>=priority_value)) continue; flash=x&0x800; - if (flash && (cpu_getcurrentframe() & 1)) continue; + if (flash && (video_screen_get_frame_number(0) & 1)) continue; fx = y & 0x2000; fy = y & 0x4000; |