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

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: */
1.1.1.4   root        8: const char Video_fileid[] = "Previous video.c : " __DATE__ " " __TIME__;
1.1       root        9: 
1.1.1.4   root       10: #include <stdbool.h>
1.1       root       11: #include <SDL_endian.h>
                     12: 
                     13: #include "configuration.h"
                     14: #include "cycInt.h"
                     15: #include "ioMem.h"
                     16: #include "m68000.h"
                     17: #include "screen.h"
                     18: #include "shortcut.h"
                     19: #include "nextMemory.h"
                     20: #include "video.h"
1.1.1.3   root       21: #include "dma.h"
                     22: #include "sysReg.h"
                     23: #include "tmc.h"
1.1.1.5 ! root       24: #include "nd_sdl.hpp"
1.1       root       25: 
                     26: /*--------------------------------------------------------------*/
                     27: /* Local functions prototypes                                   */
                     28: /*--------------------------------------------------------------*/
                     29: 
                     30: 
                     31: /*-----------------------------------------------------------------------*/
                     32: /**
                     33:  * Reset video chip
                     34:  */
1.1.1.4   root       35: void Video_Reset(void) {
1.1       root       36:        Video_StartInterrupts(0);
                     37: }
                     38: 
1.1.1.4   root       39: #define NEXT_VBL_FREQ 68
1.1       root       40: 
                     41: /**
1.1.1.4   root       42:  * Start VBL interrupt
1.1       root       43:  */
1.1.1.4   root       44: void Video_StartInterrupts ( int PendingCyclesOver ) {
                     45:     CycInt_AddRelativeInterruptUs((1000*1000)/NEXT_VBL_FREQ, 0, INTERRUPT_VIDEO_VBL);
1.1       root       46: }
                     47: 
1.1.1.3   root       48: /**
                     49:  * Generate vertical video retrace interrupt
                     50:  */
1.1.1.4   root       51: static void Video_InterruptHandler(void) {
1.1.1.3   root       52:        if (ConfigureParams.System.bTurbo) {
                     53:                tmc_video_interrupt();
                     54:        } else if (ConfigureParams.System.bColor) {
                     55:         color_video_interrupt();
                     56:     } else {
                     57:         dma_video_interrupt();
                     58:     }
                     59: }
                     60: 
                     61: 
1.1       root       62: /*-----------------------------------------------------------------------*/
                     63: /**
                     64:  * VBL interrupt : set new interrupts, draw screen, generate sound,
                     65:  * reset counters, ...
                     66:  */
1.1.1.4   root       67: static bool statusBarToggle;
                     68: void Video_InterruptHandler_VBL ( void ) {
1.1       root       69:        CycInt_AcknowledgeInterrupt();
1.1.1.4   root       70:     host_blank(0, MAIN_DISPLAY, true);
                     71:     if(statusBarToggle) Update_StatusBar();
                     72:     statusBarToggle = !statusBarToggle;
1.1.1.3   root       73:     Video_InterruptHandler();
1.1.1.4   root       74:     CycInt_AddRelativeInterruptUs((1000*1000)/NEXT_VBL_FREQ, 0, INTERRUPT_VIDEO_VBL);
1.1       root       75: }
                     76: 
                     77: 
                     78: 
                     79: 

unix.superglobalmegacorp.com

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