--- previous/src/video.c 2018/04/24 19:27:35 1.1.1.2 +++ previous/src/video.c 2018/04/24 19:29:57 1.1.1.3 @@ -22,6 +22,9 @@ const char Video_fileid[] = "Hatari vide #include "nextMemory.h" #include "video.h" #include "avi_record.h" +#include "dma.h" +#include "sysReg.h" +#include "tmc.h" /*--------------------------------------------------------------*/ @@ -34,8 +37,8 @@ static void Video_DrawScreen(void); -int nScanlinesPerFrame = 400; /* Number of scan lines per frame */ -int nCyclesPerLine = 512; +int nScanlinesPerFrame = 832; /* Number of scan lines per frame */ +int nCyclesPerLine = 1120; /*-----------------------------------------------------------------------*/ /** @@ -113,6 +116,21 @@ void Video_StartInterrupts ( int Pending } +/** + * Generate vertical video retrace interrupt + */ +void Video_InterruptHandler(void) +{ + if (ConfigureParams.System.bTurbo) { + tmc_video_interrupt(); + } else if (ConfigureParams.System.bColor) { + color_video_interrupt(); + } else { + dma_video_interrupt(); + } +} + + /*-----------------------------------------------------------------------*/ /** * VBL interrupt : set new interrupts, draw screen, generate sound, @@ -122,8 +140,9 @@ void Video_InterruptHandler_VBL ( void ) { CycInt_AcknowledgeInterrupt(); Video_DrawScreen(); - Main_EventHandler(); - CycInt_AddRelativeInterrupt(CYCLES_PER_FRAME, INT_CPU_CYCLE, INTERRUPT_VIDEO_VBL); + Main_EventHandler(); + Video_InterruptHandler(); + CycInt_AddRelativeInterrupt(CYCLES_PER_FRAME, INT_CPU_CYCLE, INTERRUPT_VIDEO_VBL); }