#72936 - mlequim - Wed Feb 22, 2006 3:02 pm
hi,
the tiles number specified in the map was in gba of 10 bits, so 1024 tiles 8x8. 1024 tiles 8x8 take 64K of memory, but if I allow for the graphics of my tiles the VRAM A I have 128K of memory. So how can I access to theses upper tiles ?
If i use more than 10 bites then I use the bits for specifying which extended palette to use,...
my question is then :
- how to access more than 1024 tiles and keep using extended palettes for tiles background.
I have not checked but a similar problem can exist with the sprites graphics data because we can now use a 128K VRAM bank.
#72961 - Mollusk - Wed Feb 22, 2006 5:39 pm
You need to use 8x8 16bit blocks instead of 16 color blocks. This will make the base block 4 times bigger, giving you access to 128k of vram, but still with 1024 possible tiles :
http://www.drunkencoders.com/documents/DS/ndslib.htm#_Sprite_Data
Quote: |
Expanding memory: Using bits 20 - 22 of DISP_CR sprite memory can be expanded as follows:
Bits 20 and 21 Memory Size Character Offset
00 32KB 32 bytes
01 64KB 64 bytes
10 128KB 128 bytes
11 256KB 256 bytes
|
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...
Last edited by Mollusk on Wed Feb 22, 2006 7:21 pm; edited 1 time in total
#72972 - mlequim - Wed Feb 22, 2006 7:17 pm
thanks ;O),
I didn't know that the DS can display 16 bit sprites !!! I LOVE the DS !
^__^. this answer for the sprites problem.
but for background the graphic tiles i don't understand, in your link I see: "the only difference seems to be that bit 4 and 5 are now character base bits allowing selection of base blocks up to base block 16 giving 256 KB of accessible memory. "
but bits 1 to 10 are used to refer the tile number no ?
#72974 - Mollusk - Wed Feb 22, 2006 7:21 pm
bits 5 and 6 in the DISP_CR, not in the sprites...
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...
#72989 - mlequim - Wed Feb 22, 2006 8:09 pm
yep sorry, I have forgot a lot of GB advance ;-)
my last question about tile memory is : the char base blocks are 16K, but the screen base block were in gba of 2k, is it still the same ? because if yes we can then place the maps only in the first 64K of the memory.
#72997 - mlequim - Wed Feb 22, 2006 8:35 pm
in fact, 16 bit sprites take 256kb but the maximal size for vram is 128, how is it possible then to use them ?
#73159 - SeanMon - Thu Feb 23, 2006 6:15 pm
I believe that you can use consecutive blocks of VRAM (A+B=256K) together as one continuous block of RAM.
#73160 - mlequim - Thu Feb 23, 2006 6:17 pm
ok I have now what I need, thanks everybody ;O)