Memory banks 2

One of the most elusive subjects of nds programming is the mapping of video memory. When you have found out the configuration you need, most of the time there is no need to change it for a long time so you don’t learn much news about this mapping.

You have to realize that the memory is not equally divided, the main screen has more space than the sub screen. Also the memory is not fixed, you can add more banks if you think you need more space.

on this page: you can clearly see that the
Main Background can be configured using
VRAM Bank A (VRAM_A) 128KB
VRAM Bank B (VRAM_B) 128KB
VRAM Bank C (VRAM_C) 128KB
VRAM Bank D (VRAM_D) 128KB

The sub screen can only use

VRAM Bank C (VRAM_C) 128KB
and can have

0x06200000 (Sub Background)
but then this C background is not available anymore for the MAIN

what is left: BANK e etc is much smaller. These banks are mainly used for palettes and sprites
and tiles, in a mode we don’t use at the moment.
We are trying to do all in bitmapmode, mode 5.

On this page:

you get the same table, but also the functions to set and restore the backgrounds.
Mind the VRAM_X_TYPE….with X = A, B, C, D

with these two pages and some examples the bitmapmode, Mode 5 should be comprehensible.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: