er - you are incorrect.. 1 16 colour char is 32 bytes not 64 so you can
actually only access half of video ram (32 * 1024 = 32768 bytes or 32k) in
16 colour mode so being able to change the base address IS useful :)
we use a lot more than 1024 16 colour chars in our backgrounds and different
layers access different areas of vram - using 256 colour chars is wasteful
(and limits you to only 1024 chars)
also - what if you want to mix 16 and 256 colour chars? by using separate
bank offsets for each layer you don't limit yourself to using the same area
of vram for both tile sets.
and for rotation/scaling backgrounds the base offset is EXTREMELY useful
allowing you to access more than 256 chars if you have 2 rotation layers!
there are all sorts of situations where just having a single base for your
chars is not the best solution...
ninge
-----Original Message-----
From: JASON [mailto:dovoto@...]
Sent: 05 September 2002 23:26
To: gbadev@yahoogroups.com
Subject: RE: [gbadev] how to use 2 char block on the same bg?!?
>you would need to use a hblank to change the char base block value at
the correct position down >the screen. either that or use two layers and
have the first set to the first char block (showing >the top half) and
the second set to display the second char block (showing the bottom
half)
I really see no point to this as you can access the entire video ram by
setting your base block to zero. Since tile numbers are 0-1023 that's
all 64KB of memory. The only time "bank switching" would be necessary
is if you have more than 1024 tiles on screen at the same time and that
is only possible using multiple layers of 16 color background tiles.
Changing the charbase block during the hblank is never necessary unless
you are trying to do some special effect or split mode operation. I
have heard it said that tile numbers use even-indexing (like sprites in
256 color mode) and I do not know where this misconception is from but
it is not true. The simplest form of memory management is to use only
character base block zero when using 256 color backgrounds and load the
map data (indexes) to the upper portion of video memory. This assures
that character data and map index data never overlap and allows complete
access to all available tile space.
-jason
www.thepernproject.com