File:  [UNIX Amiga Emulator] / uae / src / md-ppc-gcc / support.c
Revision 1.1.1.6 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:19:14 2018 UTC (8 years, 2 months ago) by root
Branches: MAIN, BSchmidt
CVS tags: uae0829, uae0828, uae0827, HEAD
uae-0.8.27

 /*
  * UAE - The Un*x Amiga Emulator
  *
  * Miscellaneous machine dependent support functions and definitions
  *
  * Copyright 1996 Bernd Schmidt
  */

#include "sysconfig.h"
#include "sysdeps.h"

#include "options.h"
#include "events.h"
#include "machdep/m68k.h"

struct flag_struct regflags;

static volatile frame_time_t last_time, best_time;
static volatile int loops_to_go;

void machdep_init (void)
{
    rpt_available = 1;
    write_log ("Calibrating delay loop.. ");
    fflush(stderr);
    loops_to_go = 5;

    sync();
    last_time = read_processor_time();
    usleep(loops_to_go * 1000000);
    best_time = read_processor_time()-last_time;
    sync();

    vsynctime = best_time / (50*loops_to_go);
    write_log ("ok - %d\n",best_time/loops_to_go);
    last_time = read_processor_time();
    best_time = read_processor_time()-last_time;
}



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.