Jump to content

Photo

Leaving VBLANK on?


5 replies to this topic

#1 gauauu OFFLINE  

gauauu

    Moonsweeper

  • 318 posts
  • Location:Illinois

Posted Thu May 5, 2016 8:18 PM

I've got a few places in my game where I need to waste a few frames to do extra CPU calculations (ie during transitions between screens).

 

I'm curious, in general, what happens if VBLANK is left on through the whole frame?  (But still doing VSYNC at the right time, using the right amount of scanlines, etc) Will it throw off TVs and cause chaos, or will it just leave the screen blank for the entire frame, or does it depend on the TV?



#2 Omegamatrix OFFLINE  

Omegamatrix

    Quadrunner

  • 6,125 posts
  • Location:Canada

Posted Thu May 5, 2016 8:24 PM

It should leave the screen blank for the whole frame, and as long as you still do Vsync you should be okay. I can't speak for every single TV, but this seems fine to me.



#3 gauauu OFFLINE  

gauauu

    Moonsweeper

  • Topic Starter
  • 318 posts
  • Location:Illinois

Posted Thu May 5, 2016 9:07 PM

Thanks!



#4 Gip-Gip OFFLINE  

Gip-Gip

    Chopper Commander

  • 210 posts
  • Location:Georgia, US

Posted Fri May 6, 2016 5:39 AM

I've got a few places in my game where I need to waste a few frames to do extra CPU calculations (ie during transitions between screens).

 

I'm curious, in general, what happens if VBLANK is left on through the whole frame?  (But still doing VSYNC at the right time, using the right amount of scanlines, etc) Will it throw off TVs and cause chaos, or will it just leave the screen blank for the entire frame, or does it depend on the TV?

It's probably not a good idea to leave vblank on. For changing screens just turn off vsync until you're ready to start the frame. Doing this every frame would never be a good idea, as it could make a dark frame in-between all other frames(causing a flicker effect) but just between scenes and stuff like that it should be fine.


Edited by Gip-Gip, Fri May 6, 2016 5:44 AM.


#5 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • 1,746 posts

Posted Fri May 6, 2016 7:02 AM

It's probably not a good idea to leave vblank on. For changing screens just turn off vsync until you're ready to start the frame. Doing this every frame would never be a good idea, as it could make a dark frame in-between all other frames(causing a flicker effect) but just between scenes and stuff like that it should be fine.

 

Using every other frame decreases the frequency of the video signal to 30 HZ; there are half as many frames, the emulator creates dark frames where none exist. 

 

This technique bypasses the deinterlacing filter in modern TV's for a much clearer display, and it's the correct spec for the phosphor on a CRT so high speed animation looks extremely smooth instead of blurry with slight image doubling.

 

You can see these differences in StarBlitz via the BW switch.

 

The Atari is tremendously flexible, I encourage everyone to experiment with changing the video signal and see what you can come up with! :)



#6 gauauu OFFLINE  

gauauu

    Moonsweeper

  • Topic Starter
  • 318 posts
  • Location:Illinois

Posted Wed Sep 7, 2016 9:01 AM

This is a little old, but for any future people that find this thread, I thought I'd add a summary about it afterward, since there's some conflicting information above.  I want to prevent confusion about the results....

 

 

It should leave the screen blank for the whole frame, and as long as you still do Vsync you should be okay. I can't speak for every single TV, but this seems fine to me.

 

I did some experimentation and this worked fine. I'm using it in my game.   I just leave vblank on, but keep the vsync timing correct. It draws a blank frame, which is exactly what I wanted.  This answer seems right on.

 

 

It's probably not a good idea to leave vblank on. For changing screens just turn off vsync until you're ready to start the frame. Doing this every frame would never be a good idea, as it could make a dark frame in-between all other frames(causing a flicker effect) but just between scenes and stuff like that it should be fine.

 

This had very bad results. (and was what caused the problems in the first place) Turning of vsync until I was ready to start the frame meant that I had an uneven frame rate, which caused the screen to roll.  Unless I'm misunderstanding what gip-gip is recommending, this answer is just incorrect.  

 

 

 

Using every other frame decreases the frequency of the video signal to 30 HZ; there are half as many frames, the emulator creates dark frames where none exist. 

 

This doesn't really relate to what I was asking.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users