|
|
1.1.1.4 ! root 1: /* 1.1 root 2: * UAE - The Un*x Amiga Emulator 1.1.1.4 ! root 3: * 1.1 root 4: * Miscellaneous machine dependent support functions and definitions 5: * 6: * Copyright 1996 Bernd Schmidt 7: */ 8: 9: #include "sysconfig.h" 10: #include "sysdeps.h" 11: 12: #include "config.h" 13: #include "options.h" 14: #include "events.h" 15: #include "machdep/m68k.h" 16: 17: struct flag_struct regflags; 18: 19: static volatile frame_time_t last_time, best_time; 20: static volatile int loops_to_go; 21: 22: void machdep_init (void) 23: { 24: rpt_available = 1; 1.1.1.3 root 25: write_log ("Calibrating delay loop.. "); 1.1 root 26: fflush(stderr); 27: loops_to_go = 5; 28: 29: sync(); 30: last_time = read_processor_time(); 31: usleep(loops_to_go * 1000000); 32: best_time = read_processor_time()-last_time; 33: sync(); 34: 35: vsynctime = best_time / (50*loops_to_go); 1.1.1.3 root 36: write_log("ok - %d\n",best_time/loops_to_go); 1.1 root 37: last_time = read_processor_time(); 38: best_time = read_processor_time()-last_time; 39: } 40: 41:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.