Language…
4 users online: Firstnamebutt, sinseiga, tOaO, yv64n - Guests: 88 - Bots: 339
Users: 64,795 (2,381 active)
Latest user: mathew

Changing custom layer 3 scroll rate

OK, is there a way to change the scroll rate of a custom layer 3 image made using the stripe image format? It would be a great help, so thank you.
Be patient.

But hey, now I'm at it, I could explain it to you. You must know, that $22-$23 = Layer 3 X and $24-$25 = Layer 3 Y.

Now say, you put this code in your level ASM:

Quote
REP #$20
LDA $1E
LSR
LSR
STA $22
SEP #$20


This will make Layer 3 X ($22-$23) scroll four times as slow as Layer 2 X ($1E-$1F). One LSR -> Twice as slow. For slightly slower (about 4/3 as slow):

Quote
REP #$20
LDA $1E
LSR
PHA
LSR
CLC
ADC $01,s
STA $22
PLA
SEP #$20


To make it faster, you do:

Quote
REP #$20
LDA $1E
ASL
STA $22
SEP #$20


Whatever. Be handy with LSR and ASL. And place it at the beginning of the code (so in front of the stripe image code). You also don't necessarily have to make it relative to $1E (Layer 2), make it relative to $1A (Layer 1) to make it scroll depending on layer 1.
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
Wow, Roy, you've been a lot of help. Thanks a million!
Originally posted by Ladida
Wow, Roy, you've been a lot of help. Thanks a million!


Thank you. Also, I forgot to mention : Take care when changing the Layer 3 Y position. The status bar IRQ will cut if off if the layer 3 tiles get too high. So, you don't want to change this Layer 3 Y at all, actually. Just mess with Layer 3 X.
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------