emulated hardware vsync
| 5270 | |
| 5271 | // emulated hardware vsync |
| 5272 | static void vsync_handler_post(void) |
| 5273 | { |
| 5274 | int monid = 0; |
| 5275 | static frame_time_t prevtime; |
| 5276 | |
| 5277 | //write_log (_T("%d %d %d\n"), vsynctimebase, read_processor_time () - vsyncmintime, read_processor_time () - prevtime); |
| 5278 | prevtime = read_processor_time(); |
| 5279 | |
| 5280 | check_nocustom(); |
| 5281 | |
| 5282 | #if CUSTOM_DEBUG > 1 |
| 5283 | if ((intreq & 0x0020) && (intena & 0x0020)) |
| 5284 | write_log(_T("vblank interrupt not cleared\n")); |
| 5285 | #endif |
| 5286 | DISK_vsync (); |
| 5287 | |
| 5288 | #ifdef WITH_LUA |
| 5289 | uae_lua_run_handler("on_uae_vsync"); |
| 5290 | #endif |
| 5291 | |
| 5292 | #ifdef DEBUGGER |
| 5293 | if (debug_copper) { |
| 5294 | record_copper_reset(); |
| 5295 | } |
| 5296 | if (debug_dma) { |
| 5297 | record_dma_reset(0); |
| 5298 | } |
| 5299 | #endif |
| 5300 | |
| 5301 | #ifdef PICASSO96 |
| 5302 | if (p96refresh_active) { |
| 5303 | // vpos_count = p96refresh_active; |
| 5304 | // vpos_count_diff = p96refresh_active; |
| 5305 | // vtotal = vpos_count; |
| 5306 | } |
| 5307 | #endif |
| 5308 | |
| 5309 | devices_vsync_post(); |
| 5310 | |
| 5311 | if (bogusframe > 0) { |
| 5312 | bogusframe--; |
| 5313 | } |
| 5314 | |
| 5315 | config_check_vsync(); |
| 5316 | if (timehack_alive > 0) { |
| 5317 | timehack_alive--; |
| 5318 | } |
| 5319 | |
| 5320 | vsync_handle_check(); |
| 5321 | |
| 5322 | vsync_cycles = get_cycles(); |
| 5323 | vhposr_prev = 0xffffffff; |
| 5324 | check_lineoptimizations(); |
| 5325 | } |
| 5326 | |
| 5327 | static void dmal_emu_disk(struct rgabuf *rga, int slot, bool w) |
| 5328 | { |
no test coverage detected