Annotation of previous/src/video.c, revision 1.1.1.3

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"
1.1.1.3 ! root       25: #include "dma.h"
        !            26: #include "sysReg.h"
        !            27: #include "tmc.h"
1.1       root       28: 
                     29: 
                     30: /*--------------------------------------------------------------*/
                     31: /* Local functions prototypes                                   */
                     32: /*--------------------------------------------------------------*/
                     33: 
                     34: 
                     35: 
                     36: static void    Video_DrawScreen(void);
                     37: 
                     38: 
                     39: 
1.1.1.3 ! root       40: int nScanlinesPerFrame = 832;                   /* Number of scan lines per frame */
        !            41: int nCyclesPerLine = 1120;
1.1       root       42: 
                     43: /*-----------------------------------------------------------------------*/
                     44: /**
                     45:  * Save/Restore snapshot of local variables('MemorySnapShot_Store' handles type)
                     46:  */
                     47: void Video_MemorySnapShot_Capture(bool bSave)
                     48: {
                     49: }
                     50: 
                     51: 
                     52: /*-----------------------------------------------------------------------*/
                     53: /**
                     54:  * Reset video chip
                     55:  */
                     56: void Video_Reset(void)
                     57: {
                     58:        Video_StartInterrupts(0);
                     59: }
                     60: 
                     61: 
                     62: /*-----------------------------------------------------------------------*/
                     63: /**
                     64:  * Reset the GLUE chip responsible for generating the H/V sync signals.
                     65:  * When the 68000 RESET instruction is called, frequency and resolution
                     66:  * should be reset to 0.
                     67:  */
                     68: void Video_Reset_Glue(void)
                     69: {
                     70: }
                     71: 
                     72: 
                     73: 
                     74: 
                     75: 
                     76: void   Video_GetPosition ( int *pFrameCycles , int *pHBL , int *pLineCycles )
                     77: {
                     78: }
                     79: 
                     80: 
                     81: 
                     82: 
                     83: /*-----------------------------------------------------------------------*/
                     84: /**
                     85:  * Clear raster line table to store changes in palette/resolution on a line
                     86:  * basic. Called once on VBL interrupt.
                     87:  */
                     88: void Video_SetScreenRasters(void)
                     89: {
                     90: }
                     91: 
                     92: 
                     93: 
                     94: 
                     95: /*-----------------------------------------------------------------------*/
                     96: /**
                     97:  * Draw screen (either with ST/STE shifter drawing functions or with
                     98:  * Videl drawing functions)
                     99:  */
                    100: static void Video_DrawScreen(void)
                    101: {
                    102: Screen_Draw();
                    103: }
                    104: 
                    105: 
                    106: 
                    107: /**
                    108:  * Add some video interrupts to handle the first HBL and the first Timer B
                    109:  */
                    110: void Video_StartInterrupts ( int PendingCyclesOver )
                    111: {
                    112:        int CyclesPerVBL;
                    113:        
                    114:         CyclesPerVBL = CYCLES_PER_FRAME;
                    115:         CycInt_AddRelativeInterrupt(CyclesPerVBL, INT_CPU_CYCLE, INTERRUPT_VIDEO_VBL);
                    116: }
                    117: 
                    118: 
1.1.1.3 ! root      119: /**
        !           120:  * Generate vertical video retrace interrupt
        !           121:  */
        !           122: void Video_InterruptHandler(void)
        !           123: {
        !           124:        if (ConfigureParams.System.bTurbo) {
        !           125:                tmc_video_interrupt();
        !           126:        } else if (ConfigureParams.System.bColor) {
        !           127:         color_video_interrupt();
        !           128:     } else {
        !           129:         dma_video_interrupt();
        !           130:     }
        !           131: }
        !           132: 
        !           133: 
1.1       root      134: /*-----------------------------------------------------------------------*/
                    135: /**
                    136:  * VBL interrupt : set new interrupts, draw screen, generate sound,
                    137:  * reset counters, ...
                    138:  */
                    139: void Video_InterruptHandler_VBL ( void )
                    140: {
                    141:        CycInt_AcknowledgeInterrupt();
                    142:        Video_DrawScreen();
1.1.1.3 ! root      143:     Main_EventHandler();
        !           144:     Video_InterruptHandler();
        !           145:     CycInt_AddRelativeInterrupt(CYCLES_PER_FRAME, INT_CPU_CYCLE, INTERRUPT_VIDEO_VBL);
1.1       root      146: }
                    147: 
                    148: 
                    149: 
                    150: 

unix.superglobalmegacorp.com

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