I've got another problem I'm trying to solve without good results.
I want to create an illusion of 2 layers of background using only 1 plane. Horizontal scrolling per single line is used.
Here's my C code:
As you can see, I want to change 224 values of scrolling at once. That's a lot, and in later progress I'll probably need whole 512. Using many subroutines is too slow, so I try to minimalize the amount of them. Basically, this is modified code of VDP_setHorizontalScroll script from Stef's devkit. While this works fine for a menu, where practically no other code is executed, it slows the game down.
The question is: what is the fastest way to change a scroll value in C / at all? I've tried to get the needed info from Charles MacDonald's documentation, but failed miserably, I'm sure I have not enough technical knowledge yet. =P Thanks in advance.
After your post I realised *pl indeed can be set once and then only modified, but because I suck at using binary operators (I never could really understand them), I'll have hard time trying to make a good loop. Thanks for your post.