gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Newbie VRAM question

#130273 - airesso - Fri Jun 01, 2007 8:50 pm

I'll start by admitting that I am very new to all of this, but I'm trying to fight my way through the tutorials I can find. In a lot of tutorials I've seen they will often use

Code:

vramSetMainBanks(VRAM_A_MAIN_BG_0x6000000,
VRAM_B_MAIN_BG_0x6020000,
VRAM_C_SUB_BG_0x6200000,
VRAM_D_LCD);


When I go to compile this (using Windows XP) I get:
error: VRAM_A_MAIN_BG_0x6000000 undeclared (first use in this function) for each of the VRAM except D.

If I change them to just VRAM_A_MAIN_BG, VRAM_B_MAIN_BG, etc it compiles fine and displays ok, but I think thats just because is so simple but I have the feeling I'm missing something important.

Thanks in advanced,
Jeremy[/code]

#130274 - tepples - Fri Jun 01, 2007 9:02 pm

Have you tried changing 0x6 to 0x06 where needed?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#130275 - airesso - Fri Jun 01, 2007 9:07 pm

Wow. That really makes me feel stupid, though it would explain why I couldn't find jack on 0x6000000 on google. Thanks...

*ashamed*

#130297 - Cydrak - Sat Jun 02, 2007 12:36 am

Diff of /libnds/include/nds/arm9/video.h

You're not stupid, the macros just changed. :) Same thing caught me whilst upgrading devkitPro...

#130306 - mml - Sat Jun 02, 2007 2:01 am

Cydrak wrote:
Diff of /libnds/include/nds/arm9/video.h


Is that to say that the version of libnds that the buildscripts fetch is older than the version of libnds packaged with r20?

That diff shows the leading zeroes being added -- I've always needed leading zeroes while using r20, but tripped over and had to remove them temporarily while playing around with a CVS build of DKP a week or two ago. Confusing much? Heh

#130320 - Cydrak - Sat Jun 02, 2007 6:29 am

Yeah, it seems to me r20 introduced them--I only meant to say the tutorials were prolly dated.

The version at the top of build-devkit.sh reads 20070127, whereas the updater gives me libnds-20070327. A clue, mayhap? I haven't tried it.