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 > Scrambled sprite

#43073 - ANeo7782 - Wed May 18, 2005 9:15 pm

I tried forever to get a sprite to display on the screen, and I've finally done it.. unfortunately now it looks all scrambled. I'm using dmaCopy to copy the raw file and the palette, and don't know what's going on. Here's a screenshot:
[Images not permitted - Click here to view it]
Any help would really be appreciated, this is my first try at DS programming.
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader


Last edited by ANeo7782 on Wed May 18, 2005 9:22 pm; edited 2 times in total

#43074 - tepples - Wed May 18, 2005 9:18 pm

All I get is 404.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43076 - ANeo7782 - Wed May 18, 2005 9:22 pm

That's what I get for not paying attention.. fixed.
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader

#43089 - tepples - Wed May 18, 2005 11:56 pm

Can you post what the image is supposed to look like, so that I can help you find possible conversion errors?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43090 - ANeo7782 - Thu May 19, 2005 12:02 am

Here's the original image.
http://dsdev.neocodenetworks.com/project/poke/images/target.bmp
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader

#43094 - strager - Thu May 19, 2005 12:33 am

Maybe you are using the wrong pallet setting, or maybe size setting. Try using 16 and 256 pallets, and 8x8, 16x16, 32x32, and 64x64 screen sizes.

#43096 - ANeo7782 - Thu May 19, 2005 1:15 am

Tried it. Still won't come out.
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader

#43101 - Ethos - Thu May 19, 2005 2:38 am

Post code.
_________________
Ethos' Homepage (Demos/NDS 3D Tutorial)

#43163 - ANeo7782 - Thu May 19, 2005 6:54 pm

Here's the code as of now..
http://dsdev.neocodenetworks.com/project/poke/poke-05-18-05.rar

Sorry it's in RAR format, I originally emailed it to myself and it rejected it as a zip file. :P
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader

#43170 - Ethos - Thu May 19, 2005 7:44 pm

Things to fix:

1) Your gfx2gba...add the argument -t8

2) Remove ATTR0_BMP

3)
Code:
void updateOAM(void)
{
   int i;
    //((uint32*)OAM)[0] = ((uint32*)OAMCopy)[0];
    for (i = 0; i < 4; i++) {
       OAM [i] = ((u16*)OAMCopy)[i];
    }
}


Tell me how that does...
_________________
Ethos' Homepage (Demos/NDS 3D Tutorial)

#43174 - ANeo7782 - Thu May 19, 2005 8:40 pm

It works! Unfortunately the center of the image appears to be transparent. It should be solid black.
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader

#43175 - Ethos - Thu May 19, 2005 8:57 pm

ANeo7782 wrote:
It works! Unfortunately the center of the image appears to be transparent. It should be solid black.


Remember...palette entry 0 is transparent!

use gfx2gba to change the transparent bit....add -a255 to the arguments
_________________
Ethos' Homepage (Demos/NDS 3D Tutorial)

#43176 - ANeo7782 - Thu May 19, 2005 8:58 pm

Had a feeling that was the problem, but wasn't sure how to fix it.

...
Unfortunately, it doesn't seem to do anything..
_________________
AndrewNeo - Username disallowed.
NCN DSDev Team Leader