Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
how to use 2 char block on the same bg?!?   Message List  
Reply | Forward Message #12611 of 15019 |
RE: [gbadev] Re: how to use 2 char block on the same bg?!?

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]





Thu Sep 5, 2002 9:17 am

n1nge
Offline Offline
Send Email Send Email

Forward
Message #12611 of 15019 |
Expand Messages Author Sort by Date

I want to set up bg 2 in mode 1 to create a scrollable background. The bg is made from a complete image so there is no tile repetion and it is divided it in...
Marco
xinn_it
Offline Send Email
Sep 4, 2002
3:00 pm

... You can fit 256 8-bit tiles or 512 4-bit tiles into a 16 KB bank. If you have more than 256 tiles, just use tile numbers greater than 255. If a tile...
yerricde
Offline Send Email
Sep 4, 2002
3:48 pm

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...
ninge
n1nge
Offline Send Email
Sep 4, 2002
3:49 pm

... 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...
yerricde
Offline Send Email
Sep 4, 2002
7:03 pm

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...
ninge
n1nge
Offline Send Email
Sep 5, 2002
9:47 am

... 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...
JASON
jason_lee_ro...
Offline Send Email
Sep 5, 2002
10:32 pm

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...
Neil Holmes
n1nge
Offline Send Email
Sep 6, 2002
10:52 am

... [...] That's only valid with 256 color backgrounds. You can access only 32KB of video memory with 10 bits indexes in 16 colors....
Omar Cornut
segamastersy...
Offline Send Email
Sep 6, 2002
10:52 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help