gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Some quick help

#104646 - Caladus - Sun Oct 01, 2006 2:48 am

I am having some trouble with my ds code. Its just a project I am using to learn. The error is pretty apparent and it will only take a sec for a knowledgable person to fix/explain. If anyone has time I would be greatful if they took a look at my code real quick. Here is a link to the code, I think seeing the problem would be alot easier than me trying to explain it and the code is only a few lines long.

http://caladus.googlepages.com/Caladus.rar

#104651 - knight0fdragon - Sun Oct 01, 2006 5:57 am

there is actually a few things that could be the problem, so explaining would be nice

if it is what I think it is, when you press A or B you get garble.

This is due to BG2 and BG3 occupying the same space in VRAM

To see how to properly do a rotation background and tile BG take a look at my page
http://hyperclubbingfriends.yourfreewebspace.com/Knight0fDragon
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#104653 - Caladus - Sun Oct 01, 2006 6:11 am

I dissabled the A and B buttons, I was just using them for testing about where I should put the tile data.

Essentially the tile data is being written over the background data. I have looked at your example several times but there is one issue. I am using a 512x512 exrot, and it takes up both Vram A and B and to do this the VRams must be consecutive. I want to use the memory allocated to Vram E to store the tile data, but I cannot figure out how to get the data to go there. In your example you place the bmp image at base 8, but I need it at base 0 because the picture is so large. It is the tile data that must move but I am beginning to think this isn't possible. If anyone knows definitely that this won't work, please let me know so I can stop banging my head against the wall. I was hoping to make a demo that used every type of 2D option to better explain how they relate to each other.

Of course if someone was to download my code, find the magical number to fix the error and then post the error, my head would explode with joy.

#104680 - knight0fdragon - Sun Oct 01, 2006 3:12 pm

you are going to have to go to bmp base 8, then change the adresses of A and B to 0x6020000 and 0x6040000

tile data is limited ti the first portion of vram i believe
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206