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

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

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 #12620 of 15019 |
RE: [gbadev] how to use 2 char block on the same bg?!?

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




Fri Sep 6, 2002 8:20 am

n1nge
Offline Offline
Send Email Send Email

Forward
Message #12620 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