yeah, got a bit confused as to what he was asking about there! the example I
was giving was for a 360 * 240 map which was using 1350 unique 16 colour
chars (it was quantised down from the originally hand painted 32bit image)
so there was the need to set different layers to different char banks so we
could display it all :)
still - quite a nice feature and I do still wonder if you can change a
layers char bank offset in hblank.. ill do some investigation when I get a
bit of time :)
ninge
-----Original Message-----
From: yerricde [mailto:d_yerrick@...]
Sent: 04 September 2002 18:23
To: gbadev@yahoogroups.com
Subject: [gbadev] Re: how to use 2 char block on the same bg?!?
--- In gbadev@y..., "ninge" <ninge@a...> wrote:
> you would need to use a hblank to change the char base block
> value at the correct position down the screen.
No, that was the NES, with a hard limit of 256 different tile
indices. Some games stretched their title screens over four
4 KB tile banks to cover all 960 tiles of the NES's display.
Videomation, the NES precursor to Mario Paint, did the same
thing. So did Qix.
The Super NES and GBA, on the other hand, can use tiles from
multiple 16 KB banks on one non-affine tile map because the
tile indexes are 10 bits as opposed to 8 bits. Think of the
tile data bank setting in BGxCNT as specifying a "starting
address" for tile data. For instance, if you set the base
address to 0 and use 16-color tiles, you can access tiles
from the beginning of bank 0 (index 0) to the end of bank 1
(index 1023). With 256 color tiles, you can go all the way
from the beginning of bank 0 (index 0) to the end of bank 3
(index 1023); however, in that case, you'll need to overlap
your map with your tile data.
Real 16-color example: Tetanus On Drugs for GBA. It stores
the playfield background in 16-color tiles from 0x0600b000 to
0x0600ffff. Then it sets the base address to 2 (0x06008000)
and uses indices 384 to 983.
Real 256-color example: Farbrausch's "fr018: aGb" demo.
Many of its phases fill the screen with a 256-color APA tile
map that uses indices 0 to 599, spanning 38 KB of VRAM. The
demo does this primarily so it can layer other backgrounds
on top or below (such as the second scene with water ripples
on top of a Hyperzone style background).
However, if you're using affine backgrounds, you can't use
more than 256 indices. If you're scaling and not rotating,
however, you can possibly use the NES style hblank bank-
switching technique.
--
Damian
Yahoo! Groups Sponsor
ADVERTISEMENT
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
intY has scanned this email for all known viruses (www.inty.com)
[Non-text portions of this message have been removed]