|
|
1.1 root 1: /*
2: Hatari - clocks_timings.h
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
6: */
7:
8: #ifndef HATARI_CLOCKS_TIMINGS_H
9: #define HATARI_CLOCKS_TIMINGS_H
10:
11:
12:
13:
14: /* All the possible clock frequencies used in the supported machines. */
15: /* When a value is 0, the corresponding part is not available in this model */
16:
17: typedef struct
18: {
19: /* Common to all machines */
20: Uint32 MCLK_Freq;
21: Uint32 BUS_Freq;
22:
23: Uint32 CPU_Freq;
24: Uint32 FPU_Freq;
25: Uint32 DMA_Freq;
26: Uint32 MFP_Freq;
27: Uint32 MFP_Timer_Freq;
28: Uint32 FDC_Freq;
29: Uint32 BLITTER_Freq;
30: Uint32 YM_Freq;
31: Uint32 ACIA_Freq;
32: Uint32 IKBD_Freq;
33:
34: /* STF specific */
35: Uint32 MMU_Freq; /* STF only */
36: Uint32 GLUE_Freq; /* STF only */
37: Uint32 SHIFTER_Freq; /* STF/STE */
38:
39: /* STE specific */
40: Uint32 MCU_Freq; /* replaces MMU+GLUE in STF */
41: Uint32 DMA_Audio_Freq; /* also used for SND SHIFTER in TT */
42:
43: /* TT specific */
44: Uint32 TTVIDEO_Freq;
45:
46: /* Falcon specific */
47: Uint32 COMBEL_Freq; /* includes the BLITTER */
48: Uint32 VIDEL_Freq;
49: Uint32 CODEC_Freq;
50: Uint32 DSP_Freq;
51:
52:
53: } CLOCKS_STRUCT;
54:
55:
56:
57: extern CLOCKS_STRUCT MachineClocks;
58:
59: extern bool RoundVBLPerSec;
60:
61:
62: #define CLOCKS_TIMINGS_SHIFT_VBL 24 /* The value returned by ClocksTimings_GetVBLPerSec is << 24 to increase precision */
63:
64: /* Functions' prototypes */
65:
66: void ClocksTimings_InitMachine ( MACHINETYPE MachineType );
67: Uint32 ClocksTimings_GetCyclesPerVBL ( MACHINETYPE MachineType , int ScreenRefreshRate );
68: Uint32 ClocksTimings_GetVBLPerSec ( MACHINETYPE MachineType , int ScreenRefreshRate );
69: Uint32 ClocksTimings_GetVBLDuration_micro ( MACHINETYPE MachineType , int ScreenRefreshRate );
70: Sint64 ClocksTimings_GetSamplesPerVBL ( MACHINETYPE MachineType , int ScreenRefreshRate , int AudioFreq );
71:
72:
73:
74:
75:
76: #endif
77:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.