Homebrew Dual Screen 2D Sprite Info/Tutorial

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,851
Country
Poland
A little bit more info would be nice. What you basically want to do is to connect two screens of the DS (dual screen mode) into one display with sprites and/or backgrounds being capable to traverse from one to the other, am I correct?
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,851
Country
Poland
I want to have status on the top. The game on the bottom, witch both are 2d.
Uhm... so you *don't* want to connect the screens, you want them to remain separate displays for separate things?

Well then just map one VRAM block for the MAIN screen and one for the SUB screen. For example:

Code:
videoSetMode(MODE_0_2D);
videoSetModeSub(MODE_0_2D);

vramSetBankA(VRAM_A_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG);

Both screens are set to work in MODE 0, the top one is set to Bank A, the bottom one to bank C. Now you can init backgrounds on either screen.

You can find examples in X:\devkitpro\Examples\nds, you'll find more there.
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,851
Country
Poland
Review the code in X:\devkitPro\examples\nds\Graphics\Sprites\simple

It shows *exactly* what you need - sprites on both the top and the bottom screen, in detail.

That is unless you're not using libnds - if you're using nflib, palib or whatever other library, review their examples. :P
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/owEOnspRpVk?si=rEd1m4Yi0aTKvjiv