static void PixelHSyncHandler175() { int line=HandleVGAHSync350(); if(line<0) return; if(line==0) VGACurrentLineAddress=VGAFrameBufferAddress; StartPixelDMA(); if(line&1) VGACurrentLineAddress+=VGAPixelsPerRow; }
static void PixelHSyncHandler117() { int line=HandleVGAHSync350(); if(line<0) return; if(line==0) { VGACurrentLineAddress=VGAFrameBufferAddress; VGAThreeLineCounter=0; } StartPixelDMA(); if(VGAThreeLineCounter++==2) { VGACurrentLineAddress+=VGAPixelsPerRow; VGAThreeLineCounter=0; } }
static void HSYNCHandler175() { switch(VGAHorizontalSyncInterruptType()) { case VGAHorizontalSyncStartInterrupt: RaiseVGAHSYNCLine(); break; case VGAHorizontalSyncEndInterrupt: LowerVGAHSYNCLine(); break; case VGAVideoStartInterrupt: if(Line<350) { StartPixelDMA(); if(Line&1) CurrentLineAddress+=PixelsPerRow; } else if(Line==350) { Frame++; // TODO: VBlank interrupt. } else if(Line==387) { LowerVGAVSYNCLine(); } else if(Line==389) { RaiseVGAVSYNCLine(); } else if(Line==448) { Line=-1; CurrentLineAddress=FrameBufferAddress; } Line++; break; } }