Jump to content
IGNORED

WIP: Scrolling tutorial


Recommended Posts

For my DLI tutorial I'm trying to work up to an example where there are multiple scrolling regions, like Nautilus or something. But it turns out I have not done any real programming with scrolling before, so I'm creating a scrolling tutorial as I build my way toward my goal. Scrolling has been covered more than DLIs and there are lots of resources out there, but I'll throw this out there too in case anyone finds it useful.

 

http://playermissile.com/scrolling_tutorial/index.html

Edited by playermissile
grammar
  • Like 12
  • Thanks 1
Link to comment
Share on other sites

*Coarse scrolling.

 

I would give slightly stronger advice for syncing VSCROL changes -- failing to synchronize these to the drawing can not only cause delays, it can seriously glitch the display list. Specifically, decreasing VSCROL around when ANTIC is processing the end of the vertical scrolling region can cause it to miss the vertical stop and wrap its 4-bit delta counter around, adding a dozen scanlines to the mode line. It's not nearly as dangerous as an unsynchronized HSCROL write, but it can still look pretty janky.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, phaeron said:

*Coarse scrolling.

 

I would give slightly stronger advice for syncing VSCROL changes -- failing to synchronize these to the drawing can not only cause delays, it can seriously glitch the display list. Specifically, decreasing VSCROL around when ANTIC is processing the end of the vertical scrolling region can cause it to miss the vertical stop and wrap its 4-bit delta counter around, adding a dozen scanlines to the mode line. It's not nearly as dangerous as an unsynchronized HSCROL write, but it can still look pretty janky.

 

I usually test it by dumping random values into the desired scroll value. Also writing the value right after STA WSYNC is exactly the wrong time. You need few cycles after WSYNC, and it also depends on the values written. I never know the correct amount, I just test it.

I find Altirra hadrware reference good in describing how it works and what all can go wrong, but it won't give you some 'best way to do it'. Is there something like that ?

Link to comment
Share on other sites

  • 3 weeks later...
51 minutes ago, pseudografx said:

Slightly off-topic:
I remember seeing a demonstration of a side-by-side scrolling where half of the screen was scrolling (horizontally) in the opposite direction than the other. Can anyone remember that, too, and possibly know what the source thread was?

 

Side by side in opposite directions.......  I can't think of a way to do that in hardware.  Maybe I lack imagination.   Pretty sure that would have to be done the hard way by actually drawing/updating the screen memory itself.  Maybe shifting images through a character set.  Either way it is still brute force code churning through memory. 

 

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...