#91247 - psycorpse - Wed Jul 05, 2006 5:16 pm
I have been messing around with this graphic and I am having no luck displaying it on the screen. The image that I have converted is 128x128 and I know that it will take 4 entries to display it but I they come out scrambled. I have used the GraphicsConverter for OS X and I have used gfx2gba for windows. No luck either way. I also used flags so that it would convert to 8x8 tiles. Any help would be great. Maybe I just need to save it to a different format but I figured I would come here first.
[Images not permitted - Click here to view it]
Thanks,
Mike
Last edited by psycorpse on Thu Jul 06, 2006 5:49 pm; edited 1 time in total
#91252 - tepples - Wed Jul 05, 2006 5:51 pm
What options are you passing to the converter? How "scrambled" is it appearing (screenshot please)? Can you provide the binary output file for me to look at in my tile editor?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#91253 - naleksiev - Wed Jul 05, 2006 6:09 pm
Maybe you just didn't set the correct tiles arrangment 1D or 2D?
#91254 - psycorpse - Wed Jul 05, 2006 6:13 pm
tepples wrote: |
What options are you passing to the converter? How "scrambled" is it appearing (screenshot please)? Can you provide the binary output file for me to look at in my tile editor? |
Here is my binary:
Homebrew Holdem
Here is my screenshot:
Screenshot
This is the command that I used to convert.
gfx2gba -c256 -t8 -pSpritePal.bin face1.gif
naleksiev wrote: |
Maybe you just didn't set the correct tiles arrangment 1D or 2D? |
I have set DISPLAY_SPR_1D
Last edited by psycorpse on Wed Jul 05, 2006 6:44 pm; edited 2 times in total
#91256 - psycorpse - Wed Jul 05, 2006 6:18 pm
***NOTE***
I believe that the .nds file there is set to use 16 colors and not 256 but it is still the same issue. I was trying all sorts of things to get this to work. Im out to lunch. Be back in a few minutes.
#91339 - psycorpse - Thu Jul 06, 2006 3:27 pm
Ok. I have changed some code around however I am still having some issues. I have again converted the image from .gif to .bmp and ran it through gfx2gba with -c256 -t8 -pSpritePal.bin *.bmp. I have added that to the data folder and have added the proper include files. Here is the new screenshot. I want to think it has something to do with the converting process but who am I to say that. HEH.
Updated Screenshot
I am also posting my code as well just to make sure that I am not doing anything wrong.
Code: |
// Setup VRAM
vramSetMainBanks(VRAM_A_MAIN_BG_0x6000000, VRAM_B_MAIN_BG_0x6020000,
VRAM_C_SUB_BG_0x6200000, VRAM_D_LCD);
// Setup Sprite VRAM
vramSetBankE(VRAM_E_MAIN_SPRITE);
// SetVideo
videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D);
videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE); |
Code: |
// copy the sprite palette
dmaCopy(SpritePal_bin, SPRITE_PALETTE, SpritePal_bin_size);
// copy the graphics
dmaCopy(face1_bin, SPRITE_GFX, face1_bin_size);
// Display the sprite
spriteEntry[0].attribute[0] = ATTR0_COLOR_256 | ATTR0_ROTSCALE_DOUBLE | 10; // y
spriteEntry[0].attribute[1] = ATTR1_ROTDATA(0) | ATTR1_SIZE_64 | 10; // x
spriteEntry[0].attribute[2] = 0;
spriteEntry[1].attribute[0] = ATTR0_COLOR_256 | ATTR0_ROTSCALE_DOUBLE | 10; // y
spriteEntry[1].attribute[1] = ATTR1_ROTDATA(0) | ATTR1_SIZE_64 | 74; // x
spriteEntry[1].attribute[2] = 32;
// Display the sprite
spriteEntry[2].attribute[0] = ATTR0_COLOR_256 | ATTR0_ROTSCALE_DOUBLE | 74; // y
spriteEntry[2].attribute[1] = ATTR1_ROTDATA(0) | ATTR1_SIZE_64 | 10; // x
spriteEntry[2].attribute[2] = 64;
spriteEntry[3].attribute[0] = ATTR0_COLOR_256 | ATTR0_ROTSCALE_DOUBLE | 74; // y
spriteEntry[3].attribute[1] = ATTR1_ROTDATA(0) | ATTR1_SIZE_64 | 74; // x
spriteEntry[3].attribute[2] = 128;
|
#91356 - psycorpse - Thu Jul 06, 2006 5:51 pm
I needed to add -t8 -T64 for 64pixel tiles. I also added -F just incase it was looking for flipped tiles. Just an FYI