Jump to content
IGNORED

VCOUNT Register Question


TGB1718

Recommended Posts

I am writing a little demo and was using the VCOUNT register to determine when the screen draw has

started and ended, however things didn't work as expected.

 

I am not using VCOUNT in a DLI, so I thought if I put a routine in the Vertical Blank routine I could see

the value of the VCOUNT register, I thought it would not be counting at this point, however my results

show the VCOUNT register keeps counting even when the screen is not being drawn.

 

I can only assume that the counter is reset to zero at the start of a screen draw, otherwise it's

free running after the end of a screen draw, can anyone confirm this.

Link to comment
Share on other sites

VCount is always updated regardless of screen position and whether an active display is occurring or not.

 

VBlank NMI actually occurs some time before VSync - just after the normal 240 scanline display.

VSync occurs before VCount rolls back to 0.

Visible display values will be same for PAL and NTSC but offscreen can differ since PAL has the extra 50 scanlines.

 

Good practice is to not rely on exact value comparisons outside the visible display since VBlank NMI can potentially take control and skip a bunch of lines.

There's also the single cycle occurrence where VCount will hit an overflow value then be adjusted back (refer Altirra Atari HW manual for description)

Edited by Rybags
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...