VRAM_B completely useless?? (Self-Solved)
Posted: Sat Apr 03, 2010 2:26 am
Hey all,
Been looking over these forums for quite a while now regarding various issues, but now I have a particularly odd issue to report myself...
In the process of writing a game, I came across (after much tedious debugging/hairpulling) in interesting problem with VRAM_B that is easily reproducible. Essentially... it doesn't work. At all. :S
I've tried using it for both VRAM_B_MAIN_BG and VRAM_B_MAIN_SPRITE, and both result in any non-palette data-transfers to the appropriate regions failing. Its not my code, because not only have I gone over it all at least 10 times, but if I simply switch out VRAM_B for say VRAM_E, it works fine (albeit with lesser storage).
The simplest way to demonstrate this issue is with the official libnds examples.
With the Simple Sprite example, simply change the line "vramSetBankA(VRAM_A_MAIN_SPRITE);" to "vramSetBankB(VRAM_B_MAIN_SPRITE);". This results in the subscreen sprite being fine, while the mainscreen sprite is simply not there. A check with the debug version of No$GBA shows that the sprite attributes have all been set, and the palette written correctly, yet the tile data is no where to be found.
This can also be demonstrated with the Allocation Test example. Simply comment out the line "vramSetBankA(VRAM_A_MAIN_SPRITE);", and leave the next line "vramSetBankB(VRAM_B_MAIN_SPRITE);" intact. A check with both the No$GBA and Ensata emulators simply shows no visuals.
Does anyone have any ideas as to what could possibly be causing this? Currently I could probably safely use the VRAM_E for my sprites, but as my game expands that 64k may not be enough...
Been looking over these forums for quite a while now regarding various issues, but now I have a particularly odd issue to report myself...
In the process of writing a game, I came across (after much tedious debugging/hairpulling) in interesting problem with VRAM_B that is easily reproducible. Essentially... it doesn't work. At all. :S
I've tried using it for both VRAM_B_MAIN_BG and VRAM_B_MAIN_SPRITE, and both result in any non-palette data-transfers to the appropriate regions failing. Its not my code, because not only have I gone over it all at least 10 times, but if I simply switch out VRAM_B for say VRAM_E, it works fine (albeit with lesser storage).
The simplest way to demonstrate this issue is with the official libnds examples.
With the Simple Sprite example, simply change the line "vramSetBankA(VRAM_A_MAIN_SPRITE);" to "vramSetBankB(VRAM_B_MAIN_SPRITE);". This results in the subscreen sprite being fine, while the mainscreen sprite is simply not there. A check with the debug version of No$GBA shows that the sprite attributes have all been set, and the palette written correctly, yet the tile data is no where to be found.
This can also be demonstrated with the Allocation Test example. Simply comment out the line "vramSetBankA(VRAM_A_MAIN_SPRITE);", and leave the next line "vramSetBankB(VRAM_B_MAIN_SPRITE);" intact. A check with both the No$GBA and Ensata emulators simply shows no visuals.
Does anyone have any ideas as to what could possibly be causing this? Currently I could probably safely use the VRAM_E for my sprites, but as my game expands that 64k may not be enough...