|
Post by mintythecat on Mar 27, 2012 15:17:05 GMT
Hello all, I am starting out with the Master-System. I have been doing some analysis of the Tile, Tile-Map and Palette Data generated by the BMP conversion Tool bmp2tile as given on Maxim's SMS Tutorial. I made some Example Tiles, one was an 8 Pixel Horizontal Line from the top of the First Tile, the Second was the same but on the next Line down and then I created an 8x8 Pixel Square all in a green Colour. "/Volumes/GRIMREAPER/forum/question_SMS_TileFormat/SMS_TileExamples.png" [/img] I get the following Tile-Data after conversion for the first Tile: Horizontal Line at the top Line: ; Tile index $000 .db $00 $FF $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00
Horizontal Line at the second Line from the Top: ; Tile index $000 .db $00 $00 $00 $00 $00 $FF $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00
Green Square as 8x8 Pixel Block: ; Tile index $000 .db $00 $FF $00 $00 $00 $FF $00 $00 $00 $FF $00 $00 $00 $FF $00 $00 $00 $FF $00 $00 $00 $FF $00 $00 $00 $FF $00 $00 $00 $FF $00 $00
So the Pixel-Data as $00 $FF $00 $00 gives me a wholey filled Line of 8 Pixels. Format: B0:?, B1: 2 Nibbles for Pixel set, B2:?, B3:?. Does anyone know what the other 3 Bytes represent? Sorry to ask such a lame Question but I need to know Btw: I have a Screengrab of my Tiles but do not know how to add in Image Files (.png) to these Messages - could someone tell me, please? Cheers.
|
|
Aypok
Sonic the Hedgehog
Posts: 2,372
|
Post by Aypok on Mar 27, 2012 17:28:10 GMT
Hello and welcome to the forum! Please forgive my post for brevity or lack of details - I'm a little low on sleep... If something doesn't make sense, let me know and I'll reply when I wake up. :) If you've not already done so, check out: www.smspower.org/maxim/HowToProgram/Tiles - that'll explain what I'm trying to explain much better. So the Pixel-Data as $00 $FF $00 $00 gives me a wholey filled Line of 8 Pixels. Format: B0:?, B1: 2 Nibbles for Pixel set, B2:?, B3:?. Does anyone know what the other 3 Bytes represent? The colours. Each pixel can be one of sixteen colours, so the nibble tells it which colour to use. I probably can't explain it well right now, but I find it far easier to understand if it's written in binary. Here's your example in binary: (one byte per line) 00000000 11111111 00000000 00000000
What you do is read it top to bottom (each column is a pixel) - each vertical nibble gives the number of the colour to use in the palette. Here, they're all using the third colour. If you try adding different colours in to your test tiles (and pay attention to the ordering of the palette), it may help. Or perhaps writing the tile data as binary strings and editing them. Sorry to ask such a lame Question but I need to know :D Don't worry - we all start somewhere and we're very friendly around here. :) Btw: I have a Screengrab of my Tiles but do not know how to add in Image Files (.png) to these Messages - could someone tell me, please? It's easiest if you upload it to somewhere like imgur.com and use the forum's " " tags (click the the "picture" icon on the second row of control items above the edit/post box - fourth from the left).
|
|