SGDK usage, need help understanding some parts
Posted: Sat May 25, 2013 9:20 pm
Hi guys,
I've been starting into development for Megadrive lately, and have been reading loads of documents and articles to get to grips with how this beast works.
I am getting at a point, where I have questions, but nowhere to ask, so I figured people here might be able to point me into the right directions.
I am having issues trying to understand how palette data and VRAM data combine and work together.
I have 2 images which I want to display, which I both am loading into VRAM using VDP_loadTileData (I have converted my images using GenRes), and am loading the palette data into different pallete's each.
I think I'm right by saying all image data (tiles) get loaded into 1 big "image" on VRAM.
Now when I display these images, how can I define the alpha channel for each image (or tell one not to use alpha at all), or is alpha only reserved for Sprites?
I tried to load tile data and sprites together before (I had no issue displaying them separately), but they seem to get corrupted when I attempt this. How do I load a certain Tile from VRAM?
I see some examples (for instance the sonic animation) do spritename>>8, now my programming skills don't go far enough to know what that exactly does, I believe it's bitshifting, but can someone explain easily what this does behind the scenes?
I am sorry for all the amount of questions in 1 post, I'm just trying to learn and experiment with this, no doubt I'll be posting more stuff later (probably even to get it to run on actual hardware, and yes, I'm aware of the elements required for that).
I hope someone here will take some time to help me, I am also available on twitter and Skype (tw: @rawrDennis, sk: kak-hoofd)
kind regards,
Dennis
I've been starting into development for Megadrive lately, and have been reading loads of documents and articles to get to grips with how this beast works.
I am getting at a point, where I have questions, but nowhere to ask, so I figured people here might be able to point me into the right directions.
I am having issues trying to understand how palette data and VRAM data combine and work together.
I have 2 images which I want to display, which I both am loading into VRAM using VDP_loadTileData (I have converted my images using GenRes), and am loading the palette data into different pallete's each.
I think I'm right by saying all image data (tiles) get loaded into 1 big "image" on VRAM.
Now when I display these images, how can I define the alpha channel for each image (or tell one not to use alpha at all), or is alpha only reserved for Sprites?
I tried to load tile data and sprites together before (I had no issue displaying them separately), but they seem to get corrupted when I attempt this. How do I load a certain Tile from VRAM?
I see some examples (for instance the sonic animation) do spritename>>8, now my programming skills don't go far enough to know what that exactly does, I believe it's bitshifting, but can someone explain easily what this does behind the scenes?
I am sorry for all the amount of questions in 1 post, I'm just trying to learn and experiment with this, no doubt I'll be posting more stuff later (probably even to get it to run on actual hardware, and yes, I'm aware of the elements required for that).
I hope someone here will take some time to help me, I am also available on twitter and Skype (tw: @rawrDennis, sk: kak-hoofd)
kind regards,
Dennis