Jump to content

Recommended Posts

On 5/26/2022 at 6:07 PM, Ed Minchau said:

I'd have the IRQ do as little as possible. For Asteroid Commander it just updates a couple of bytes set aside for flag bits. The main program then checks those bits a couple hundred times a second, each time a major subroutine is finished and at least once for every trip through the main loop.

Just the reverse.  I like to put the screen update in the IRQ and the game logic in main loop.  Furthermore I use ONLY a raster IRQ which starts when the beam goes of the bottom of the screen.  That way I should update the screen between the time the beam leaves the bottom of the screen and it reaches the top of the usable area.  No tearing and no flicker if you do that.

  • Like 1
Link to comment
Share on other sites

On 8/3/2022 at 10:00 AM, Michael Kaiser said:

Just the reverse.  I like to put the screen update in the IRQ and the game logic in main loop.  Furthermore I use ONLY a raster IRQ which starts when the beam goes of the bottom of the screen.  That way I should update the screen between the time the beam leaves the bottom of the screen and it reaches the top of the usable area.  No tearing and no flicker if you do that.

I find I'm now using a mixture.  On the video demo I just uploaded, the PCM audio files are loaded within the custom IRQ when the AFLOW flag is set.  The IRQ also keeps track of the number of "ticks" of the VSYNCH, and every fourth tick it sets a flag.  The main program looks for that flag and when it is set loads a video image and pushes it to VERA. This causes it to occasionally miss the signal to load another video frame, so by the end of the demo the audio is slightly ahead of the video.  At least, I think that's what's causing the lag.

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.

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.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use