Search
lxdream.org :: lxdream/src/clock.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/clock.h
changeset 30:89b30313d757
prev23:1ec3acd0594d
next261:93fdb2a70e18
author nkeynes
date Wed Jan 03 09:00:17 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Adjust timers when they're read rather than waiting until the next time
slice. Also temporarily cut the CPU time by 4.
Initialize the FRQCR register to 0x0E0A for convenience
view annotate diff log raw
     1 /**
     2  * $Id: clock.h,v 1.3 2005-12-25 05:56:55 nkeynes Exp $
     3  * External interface to the dreamcast serial port, implemented by 
     4  * sh4/scif.c
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    18 #ifndef dream_clock_H
    19 #define dream_clock_H 1
    21 #include <stdint.h>
    23 #ifdef __cplusplus
    24 extern "C" {
    25 #endif
    27 #define MHZ
    28 #define SH4_BASE_RATE 200 MHZ
    29 #define ARM_BASE_RATE 33 MHZ
    31 extern uint32_t sh4_freq;
    32 extern uint32_t sh4_peripheral_freq;
    33 extern uint32_t sh4_bus_freq;
    34 extern uint32_t sh4_cpu_period;
    35 extern uint32_t sh4_peripheral_period;
    36 extern uint32_t sh4_bus_period;
    37 extern uint32_t arm_freq;
    39 #ifdef __cplusplus
    40 }
    41 #endif
    43 #endif
.