Jump to content

Background scrolling


pacifist

Recommended Posts

Alright! Dualis 10 is running things beautifully!

 

I stopped using dualis a month ago and just started deving on my ds but dualis now emulates all the things important to me. Plus I can pass my game around to friends w/o a passme now.

 

Hoorah for mic!

 

Actually there is one minor thing that dualis 10 is doing wrong for me. When I set the scroll registers for gb3 the scroll registers for sub_bg3 also change.

 

so the ndslib code

BG3_CX = 50;
BG3_CY = 50;

scrolls BG3 as well as SUB_BG3.

 

I can work up a quick demo to show it off if you like.

 

Also, not surprisingly, fading to white does crazy bad things.

Link to comment
Share on other sites

yes and no

 

there are 4 rotation scaling values and 2 positional values that scroll the whole background (as I'm sure you know).

 

from ndslib these values are

 

#define BG3_XDX        (*(vuint16*)0x04000030)
#define BG3_XDY        (*(vuint16*)0x04000032)
#define BG3_YDX        (*(vuint16*)0x04000034)
#define BG3_YDY        (*(vuint16*)0x04000036)
#define BG3_CX         (*(vuint32*)0x04000038)
#define BG3_CY         (*(vuint32*)0x0400003C)

#define SUB_BG3_XDX    (*(vuint16*)0x04001030)
#define SUB_BG3_XDY    (*(vuint16*)0x04001032)
#define SUB_BG3_YDX    (*(vuint16*)0x04001034)
#define SUB_BG3_YDY    (*(vuint16*)0x04001036)
#define SUB_BG3_CX     (*(vuint32*)0x04001038)
#define SUB_BG3_CY     (*(vuint32*)0x0400103C)

 

When I change BG3_CX or BG3_CY then SUB_BG3_CX or SUB_BG3_CY change as well.

 

This might well be true for the rot/scale data too. I just set them both to the identity.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...