|
|
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 "options.h"
13: #include "events.h"
14: #include "machdep/m68k.h"
15:
16: struct flag_struct regflags;
17:
18: static volatile frame_time_t last_time, best_time;
19: static volatile int loops_to_go;
20:
21: void machdep_init (void)
22: {
23: rpt_available = 1;
1.1.1.3 root 24: write_log ("Calibrating delay loop.. ");
1.1 root 25: fflush(stderr);
26: loops_to_go = 5;
27:
28: sync();
29: last_time = read_processor_time();
30: usleep(loops_to_go * 1000000);
31: best_time = read_processor_time()-last_time;
32: sync();
33:
34: vsynctime = best_time / (50*loops_to_go);
1.1.1.3 root 35: write_log("ok - %d\n",best_time/loops_to_go);
1.1 root 36: last_time = read_processor_time();
37: best_time = read_processor_time()-last_time;
38: }
39:
40:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.