View Single Post
Old 22 November 2015, 23:45   #62
Registered User

keithbugeja's Avatar
Join Date: Nov 2015
Location: Birkirkara, Malta
Posts: 13
Originally Posted by Mrs Beanbag View Post
Blitting the entire playfield is completely unnecessary... you just shift the start of screen memory one word to the right and keep on going. As long as you have a little extra Chip RAM to move into, the image just wraps round and round. Remember memory is always linear, the 2 dimensions of the screen are an illusion.
Thanks for your clarifications. How would this work for large maps? If, say, I keep moving screen memory to the right, would I not eventually reach the boundaries of allocated memory, independent of representation?

Originally Posted by Mrs Beanbag View Post
if the other sprites can also be updated at 50fps, there is no problem. Although Mr Beanbag does experience this problem, because the hardware scrolling has granularity of 1/4 pixel horizontally, and of course bobs are restricted to full pixel motions, so sometimes enemy sprites that are chasing the player can appear to vibrate slightly. But 1/4 pixel scrolling is not possible on OCS anyway.
Thanks again for enlightening me! I hadn't the faintest clue that hardware supported a granularity of 1/4 pixel horizontally. So I might be misunderstanding your answer, but the problem I experienced was not due to spatial resolution but disparity in temporal updates. In particular, the player camera logic was running as an ISR at 50 Hz, decoupled from the rendering, which ran at 25 Hz. The ISR also updated the registers that controlled the start of screen memory and per-pixel scrolling; this made up for the slower map-drawing updates, and kept the scrolling running at 50 Hz. The sprites on the other hand updated during map drawing cycles, at 25 Hz, so every other frame they would move with the scrolling background, giving the impression they were somehow vibrating.

Caveat: Only true if memory serves me well.

Last edited by keithbugeja; 28 November 2015 at 11:43.
keithbugeja is offline  
Page generated in 0.07310 seconds with 9 queries