| |
8bitforever Account closed
Registered: Oct 2009 Posts: 48 |
Smooth horizontal bitmap scroller ($d016)
8bitforever is back after a 14 month coding break.
I´m trying hard to develop a $d016 bitmap (koala pic) scroller. But it flickers sporadicly.
The jitter/flicker is a 1 char movement of the bitmap.
<-<-<-<-<-
__________
|JJOKOKOK|
|JJOKOKOK|
|JJOKOKOK|
|JJOKOKOK|
__________
JJ=Jitter or flicker area. This can happen in 15-25% of the screen area.
OK=Perfect smooth scrolling of the bitmap (koala pic).
<-=Horizontal Scroll direction.
No VSP/HSP suggestions please.
1) Why do I have jitter/flicker in 15-25% of the screen area ?
2) Suggestions on how get rid of the jitter/flicker ?
|
|
... 10 posts hidden. Click here to view all posts.... |
| |
Skate
Registered: Jul 2003 Posts: 494 |
it's been already said but problem is not about scrolling bitmap. you can have the same problem with a standard 1x1 char scroller as well. it's all about $d012. put a "inc $d020" before scroll routine and "dec $d020" after scroll routine and see if scrolling area is clean.
4 character lines (32 raster lines) are ideal for playing music. use that area for music and start scrolling from the bottom of that area.
if you try to scroll 4 char lines high bitmap using standard loops ( no unrolled code), you're gonna need 16410 cycles which takes %83.5 CPU. Since 4 character area means ~%10 CPU and it's enough for playing music, if you don't have much more things going on in the screen, you don't need to spend too much memory. |
| |
TWW
Registered: Jul 2009 Posts: 545 |
You should/could still double-buffer it though if you are planning to do something more on that screen...
frame 1: Flipp buffer and scroll $d800 data
frame 2-7: Pull 2'nd buffer (bitmap & $0400 collors)
frame 8: flipp buffer and scroll $d800 data
frame 9-15: Pull 1'st buffer (Bitmap $ $0400 collors)
do from beginning!
You need to place out the graphics to scroll in both buffers aswell and in the correct time. Buit seeing your nice ascii gfx up there I'm sure you'll figgure it out 8-D
You should get away with a fraction of the raster time needed distributing it on 8 frames instead of doing it all on one.
Ofcourse it would eat more R-Time the faster the scroller goes (i.e scrolling 2 pixels at the time means you need to move the gfx faster)...
anyways, where was I.... |
| |
Digger
Registered: Mar 2005 Posts: 437 |
Or slow everything down (let's say you increment $D016 every 50 frames) and then trace carefully what happens in each shift. You'll get the point where the jitter appears and then it's easy to investigate further from there. |
| |
8bitforever Account closed
Registered: Oct 2009 Posts: 48 |
Thank you very much,
problem solved due to your excellent suggestions !
Thank you once again ! |
| |
Nitro Account closed
Registered: Aug 2008 Posts: 13 |
About Digger's post: there's much better method, pressing ALT plus + enters pause mode, where you can step through individual frames by again using ALT and +.
Alt+Pause resumes normal work. |
| |
Digger
Registered: Mar 2005 Posts: 437 |
@Nitro: Nice, is this in VICE? |
| |
Zielok
Registered: Mar 2009 Posts: 6 |
Yes, this is in Vice. |
Previous - 1 | 2 - Next |