Mapping Vram H to sub BG...

Post Reply
relminator
Posts: 84
Joined: Sun Apr 11, 2010 10:43 am

Mapping Vram H to sub BG...

Post by relminator » Fri Jul 23, 2010 8:01 am

Sorry for double posting as my net time is kind of limited these days.

Video.h

Code: Select all

typedef enum {
	VRAM_H_LCD                = 0,
	VRAM_H_SUB_BG             = 1,
	VRAM_H_SUB_BG_EXT_PALETTE = 2,
} VRAM_H_TYPE;

256 * 192 = 48kb

Code: Select all

Bank H                       0x06898000          0x0689FFFF          32KB  
Bank I                       0x068A0000          0x068A3FFF          16KB 
Bank H is just 32 KB. Does it mean that bank I gets mapped to sub BG also?

I wanna map this as LCD since I want to do some per pixel stuff on the sub screen.


Also when I call:

Code: Select all

gluTexLoadPal();
Is the pallete loaded in vram bank E?


So far this is how I've been using the VRAM.

A = filled by two gltextures at 64 kb each so all of 128 kb is filled.

B = Some textures but still have a lot left.

C = Not used yet (only by consoledemoInit())

D = VRAM_D_SUB_SPRITE (But still lots of stuff free)

E = Unused but I'm not sure if glpalette uses it.

F, G, H, I = not used.

Thanks!

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Mapping Vram H to sub BG...

Post by zeromus » Fri Jul 23, 2010 7:01 pm

Why would VRAM_I get mapped to sub bg unless you told it to? I'm not sure what "just 32KB" has to do with it. There are separate controls for it just beneath the VRAM_H_TYPE enum you pasted.

It seems as if the libnds texture palette system is hardcoded to use VRAM_E. you can see that for yourself in http://devkitpro.svn.sourceforge.net/vi ... xt%2Fplain

relminator
Posts: 84
Joined: Sun Apr 11, 2010 10:43 am

Re: Mapping Vram H to sub BG...

Post by relminator » Sat Jul 24, 2010 2:12 am

Well, since H is just 32 kb and I need 48kb for a full subscreen and I is 16kb...

But nevermind. The question has been answered. ;*)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest