#148724 - JanoSicek - Wed Jan 09, 2008 11:30 am
I want to write a nice 'engine' that could potentially be used for coding some nice 2D scroller gamer on DS. I disregard 3D completelly.
The VRAM banks assigment I want to use is:
VRAM A - MAIN BG 0x600 0000
VRAM B - MAIN SPRITE 0x642 0000
VRAM C - SUB BG 0x620 0000
VRAM D - MAIN BG 0x602 0000
VRAM E - MAIN SPRITE 0x640 0000
VRAM F - MAIN EXTENDED PALETTES 0..1
VRAM G - MAIN SPRITE EXTENDED PALETTES 0..1
VRAM H - SUB EXTENDED PALETTES 0..3
VRAM I - SUB SPRITE 0x660 0000
This would map me this memory:
MAIN BG: 256kB in one block from 0x600 0000
SUB BG: 128kB in one block from 0x620 0000
MAIN SPRITE: 192kB in two blocks
SUB SPRITE: 16kB in one block
And some palettes.
Now my questions:
As I mapped only 16kB for extended palettes, does this mean that I have only 2 palettes that will be used for backgrounds 0&1 ?
What will display on background 2&3?
I believe that there is some shift register with which I can map the other backgrounds to use the same palettes...
How the sprite ext. palettes work? As there is no background layer for sprites, and I have 2 sprite palettes on main screen... what do they do? Or is the second palette (second 8kB) ignored and the first one is always used?
If I want to use sprite palettes on BOTH screen, do I need to assign separate banks for ext palettes for each screen, even though they only need 8kB each?
And more -- to use ext. palettes for sprites on sub screen, I need to use bank I, and then only bank I can use for sprites themselves is bank D, which is 128kB (a waste for me)
If anyone can answer me, or give me any tips, that would be welcome. Thanks!
The VRAM banks assigment I want to use is:
VRAM A - MAIN BG 0x600 0000
VRAM B - MAIN SPRITE 0x642 0000
VRAM C - SUB BG 0x620 0000
VRAM D - MAIN BG 0x602 0000
VRAM E - MAIN SPRITE 0x640 0000
VRAM F - MAIN EXTENDED PALETTES 0..1
VRAM G - MAIN SPRITE EXTENDED PALETTES 0..1
VRAM H - SUB EXTENDED PALETTES 0..3
VRAM I - SUB SPRITE 0x660 0000
This would map me this memory:
MAIN BG: 256kB in one block from 0x600 0000
SUB BG: 128kB in one block from 0x620 0000
MAIN SPRITE: 192kB in two blocks
SUB SPRITE: 16kB in one block
And some palettes.
Now my questions:
As I mapped only 16kB for extended palettes, does this mean that I have only 2 palettes that will be used for backgrounds 0&1 ?
What will display on background 2&3?
I believe that there is some shift register with which I can map the other backgrounds to use the same palettes...
How the sprite ext. palettes work? As there is no background layer for sprites, and I have 2 sprite palettes on main screen... what do they do? Or is the second palette (second 8kB) ignored and the first one is always used?
If I want to use sprite palettes on BOTH screen, do I need to assign separate banks for ext palettes for each screen, even though they only need 8kB each?
And more -- to use ext. palettes for sprites on sub screen, I need to use bank I, and then only bank I can use for sprites themselves is bank D, which is 128kB (a waste for me)
If anyone can answer me, or give me any tips, that would be welcome. Thanks!