#158336 - sUPREz - Mon Jun 09, 2008 12:10 pm
I everyone. I have some troubles setting up my program. I want to have 3D on the lower screen and 2d over a background on the upper screen. I manage to do everything separately. I just can't merge this 3 thing together.
The 3 part is set up like that :
Quote: |
videoSetMode(MODE_0_3D);
vramSetBankA(VRAM_A_TEXTURE);
|
When I add "consoleDemoInit()", I can print anything on the other screen.
I have a separate project to print 2d background on the sub screen. It's set up like that :
Quote: |
vramSetBankC(VRAM_C_SUB_BG_0x06200000);
videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);
|
But if I declare everything in the same time, I can't print anything.
Anyone know a good tutorials that explain how to print text over a 2d background ?
#158337 - eKid - Mon Jun 09, 2008 12:24 pm
What kind of background do you want the text to appear over? (what bit depth?)
The sub screen can only have 128KB of video memory for the background, so you have to make sure there's enough memory for both the console and the background.
Here's something I made awhile ago. It shows the console text over a 16-bit BG. 96KB are used for the 256x192 bitmap. The console uses a bit of the remaining memory.
http://ekid.nintendev.com/bitmap_console.zip
#158338 - sUPREz - Mon Jun 09, 2008 12:32 pm
Thanks a lot eKid. I'll check your source.
There will be enough memory because my image has the same size and format than your example.
#161071 - mathHeadInClouds - Sun Jul 27, 2008 9:59 pm
eKid,
your code does not compile on my machine, and I don't think it's me (got devkit pro less than 2 months ago and all the nds examples therein do compile.)
could it be that you put up the wrong files accidentally or so? Anynoe got that code to compile?
#161088 - eKid - Mon Jul 28, 2008 3:48 am
Whoops, looks like grit got updated a bit, I needed to add -gb to the grit file to output a bitmap. The code also uses some members that were removed from the touch position thingy.
I've updated the zip with a fixed version.
#161102 - mathHeadInClouds - Mon Jul 28, 2008 9:46 am
Quote: |
I've updated the zip with a fixed version. |
The one linked to in this thread? I just downloaded that again and I'm getting the same errors:
hillsBitmap and hillsBitMapLen undeclared identifyers.
(and a waring about iprintf because stdio wasn' included)
adding -gb or replacing -gb16 by -gb in the grit file does not change that
#161378 - silent_code - Sat Aug 02, 2008 1:27 pm
@ mathHeadInClouds: You might want to take a look at the other thread... ;^)
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.