|
|
1.1 root 1: /*
2: video.c
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: const char Video_fileid[] = "Hatari video.c : " __DATE__ " " __TIME__;
9:
10: #include <SDL_endian.h>
11:
12: #include "main.h"
13: #include "configuration.h"
14: #include "cycles.h"
15: #include "cycInt.h"
16: #include "ioMem.h"
17: #include "m68000.h"
18: #include "memorySnapShot.h"
19: #include "screen.h"
20: #include "screenSnapShot.h"
21: #include "shortcut.h"
22: #include "nextMemory.h"
23: #include "video.h"
24: #include "avi_record.h"
25:
26:
27: /*--------------------------------------------------------------*/
28: /* Local functions prototypes */
29: /*--------------------------------------------------------------*/
30:
31:
32:
33: static void Video_DrawScreen(void);
34:
35:
36:
37: int nScanlinesPerFrame = 400; /* Number of scan lines per frame */
38: int nCyclesPerLine = 512;
39:
40: /*-----------------------------------------------------------------------*/
41: /**
42: * Save/Restore snapshot of local variables('MemorySnapShot_Store' handles type)
43: */
44: void Video_MemorySnapShot_Capture(bool bSave)
45: {
46: }
47:
48:
49: /*-----------------------------------------------------------------------*/
50: /**
51: * Reset video chip
52: */
53: void Video_Reset(void)
54: {
55: Video_StartInterrupts(0);
56: }
57:
58:
59: /*-----------------------------------------------------------------------*/
60: /**
61: * Reset the GLUE chip responsible for generating the H/V sync signals.
62: * When the 68000 RESET instruction is called, frequency and resolution
63: * should be reset to 0.
64: */
65: void Video_Reset_Glue(void)
66: {
67: }
68:
69:
70:
71:
72:
73: void Video_GetPosition ( int *pFrameCycles , int *pHBL , int *pLineCycles )
74: {
75: }
76:
77:
78:
79:
80: /*-----------------------------------------------------------------------*/
81: /**
82: * Clear raster line table to store changes in palette/resolution on a line
83: * basic. Called once on VBL interrupt.
84: */
85: void Video_SetScreenRasters(void)
86: {
87: }
88:
89:
90:
91:
92: /*-----------------------------------------------------------------------*/
93: /**
94: * Draw screen (either with ST/STE shifter drawing functions or with
95: * Videl drawing functions)
96: */
97: static void Video_DrawScreen(void)
98: {
99: Screen_Draw();
100: }
101:
102:
103:
104: /**
105: * Add some video interrupts to handle the first HBL and the first Timer B
106: */
107: void Video_StartInterrupts ( int PendingCyclesOver )
108: {
109: int CyclesPerVBL;
110:
111: CyclesPerVBL = CYCLES_PER_FRAME;
112: CycInt_AddRelativeInterrupt(CyclesPerVBL, INT_CPU_CYCLE, INTERRUPT_VIDEO_VBL);
113: }
114:
115:
116: /*-----------------------------------------------------------------------*/
117: /**
118: * VBL interrupt : set new interrupts, draw screen, generate sound,
119: * reset counters, ...
120: */
121: void Video_InterruptHandler_VBL ( void )
122: {
123: CycInt_AcknowledgeInterrupt();
124: Video_DrawScreen();
125: Main_EventHandler();
126: CycInt_AddRelativeInterrupt(CYCLES_PER_FRAME, INT_CPU_CYCLE, INTERRUPT_VIDEO_VBL);
127: }
128:
129:
130:
131:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.