Sprite drawing problem
Moderator: Stef
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
After giving up on IsaGenesis, I ran a few tests in Genitile to see what's going on.
This is my source image. It's 8x8 pixels, 256 colours, the format Genitile says to prefer. The original is in bmp format but imgur seems to have formatted it to png.
Here's an enlarged version to see what it looks like.
My command line to convert it was this, pretty straightforward:
genitile.exe square256colors.bmp -sprw 1 -sprh 1 -o h
And here's what it looks like in Gens Rewind and Kega Fusion.
The top line winds up to be transparent, which is expected.
As you can see, the purple and yellow lines have been swapped around. Without seeing the source code, I can't really guess as to what's going on. I don't think the source has been released, has it?
IsaGenesis and Genitile seem both to be abandoned. Are there alternatives to these tools?
DJCC.
This is my source image. It's 8x8 pixels, 256 colours, the format Genitile says to prefer. The original is in bmp format but imgur seems to have formatted it to png.
Here's an enlarged version to see what it looks like.
My command line to convert it was this, pretty straightforward:
genitile.exe square256colors.bmp -sprw 1 -sprh 1 -o h
And here's what it looks like in Gens Rewind and Kega Fusion.
The top line winds up to be transparent, which is expected.
As you can see, the purple and yellow lines have been swapped around. Without seeing the source code, I can't really guess as to what's going on. I don't think the source has been released, has it?
IsaGenesis and Genitile seem both to be abandoned. Are there alternatives to these tools?
DJCC.
I use 16 color bmp file, but i'm not sure this is your problem.
How do you call your sprite? with SGDK command? (VDP_doVRamDMA, then VDP_setSprite)?
I don't think the problem is genitile or imaGenesis cause this work perfectly for me and all users. It's no use to try another soft i think, we had to find where your problem is (but I can't be helpful for you cause i'm a newbee :/)
How do you call your sprite? with SGDK command? (VDP_doVRamDMA, then VDP_setSprite)?
I don't think the problem is genitile or imaGenesis cause this work perfectly for me and all users. It's no use to try another soft i think, we had to find where your problem is (but I can't be helpful for you cause i'm a newbee :/)
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
I'm pretty certain it's not my source images.
I've just figured out how to use GenRes in SGDK and they come out fine.
So I'm not sure what's going on with ImaGenesis and Genitile. The exported data, as c structs, just looks wrong. Maybe they're just very fussy with format. But somehow I doubt that since ImaGenesis does load my images and shows them correctly. So I donno.
But now that I've been able successful with GenRes, I think I'll just use that.
Thanks for your help, oofwill.
I've just figured out how to use GenRes in SGDK and they come out fine.
So I'm not sure what's going on with ImaGenesis and Genitile. The exported data, as c structs, just looks wrong. Maybe they're just very fussy with format. But somehow I doubt that since ImaGenesis does load my images and shows them correctly. So I donno.
But now that I've been able successful with GenRes, I think I'll just use that.
Thanks for your help, oofwill.
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
You can find it here.
http://dl.dropbox.com/u/17303735/square256colors.bmp
http://dl.dropbox.com/u/17303735/square256colors.bmp
oofwill wrote:Give me your bmp image, i'll do a test for you.
I just test with a 8*8 sprite and it's works perfectly, so if i can help you to found where the problem is, i'll do it with pleasure
Ok, i just did the test, it works for me.
First, i decreased colors to 16max.
Save the file, 8bits bmp.
Converted with genitile with this command line:
then, rename two files squarep.s and squaret.s
In file, i add those lines :
finally, code as this in SGDK :
This works for me with gens, so I dunno where the problem is.
Try to compare with your method and find out the problem
First, i decreased colors to 16max.
Save the file, 8bits bmp.
Converted with genitile with this command line:
Code: Select all
genitile square.bmp -pal -sprw 1 -sprh 1 -o asgcc
In file, i add those lines :
Code: Select all
.global square_pal
.global square_tiles
Code: Select all
VDP_setPalette(0, square_pal);
VDP_doVRamDMA((u32) square_tiles, 3104, 32);
VDP_setSprite(0, 100, 150, SPRITE_SIZE(1,1), TILE_ATTR_FULL(PAL0,0,0,0,97),0);
VDP_updateSprites();
Try to compare with your method and find out the problem
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am