newbie creating genesis graphics

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

mmarcati
Newbie
Posts: 9
Joined: Wed Apr 04, 2007 2:04 pm
Contact:

Post by mmarcati » Wed Apr 04, 2007 10:08 pm

Yes, they just want the bmps.. Thats ONE weight off my back.. :)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Apr 05, 2007 6:57 am

can you give us any hints what kind of game are you working on ? I hope you're allowed to...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

mmarcati
Newbie
Posts: 9
Joined: Wed Apr 04, 2007 2:04 pm
Contact:

Post by mmarcati » Thu Apr 05, 2007 7:07 am

I actually don't knw if i'm allowed or not... I can surely say this: nothin new... I'm giving a new face to an old game... And its a simple puzzle game. I'll be working on 4 games and they will be all remakes of simple games released on other platforms, such as the master system.

Oh what the hell. I'm currently working on a version of Hexxagon.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Apr 05, 2007 7:29 am

I thought something new... well, I am doing something new, alone, contains bloody action, for 18+ and I'm 17 !!!
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

FrozenDelight
Interested
Posts: 45
Joined: Tue Aug 14, 2007 12:51 am

Megadrive colours for a newbie

Post by FrozenDelight » Tue Aug 14, 2007 1:01 am

Hello, I'm really sorry to just come out of the blue here and ask a question, but it is related;

I want to make graphics (sprites, backgrounds ect) that look like they are from a Megadrive game. But I'm used to having no limitations on what colours I can use. I don't quite understand how the Megadrive colours work. So it uses like, 256 colours, right? Which colours does it use? That sounds really dumb doesn't it, I'm sorry it's just I don't understand how colours work on old consoles.

All I know if that SNES games looked more colourful than Megadrive games, but I prefer the "darker" look Megadrive games had. I want to emulate that look.

I have GraphicsGale, how would I setup myself up?

Thank you for your time.

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Tue Aug 14, 2007 1:32 am

The Megadrive had four 15/16-color palettes (one color from each palette is used as transparent, but it can be used to color the backdrop) for a total of 61 colors onscreen. So basically each sprite can only use 15 colors and each background tile (8x8 pixel square on a particular background plane) can use only 15/16 colors and the overall image should have no more than 61 colors in it.

Also, the palette entries are defined in 9-bit color, so there's only 512 colors to choose from total.

FrozenDelight
Interested
Posts: 45
Joined: Tue Aug 14, 2007 12:51 am

Post by FrozenDelight » Tue Aug 14, 2007 12:13 pm

Oh right, thank you.

512 colors to choose from? So how do I know which colours those are?

When you start a new picture in GraphicsGale, it askes you to choose from 1bit, 4bit, 8bit etc. There's no 9bit.

Sorry for being a pain.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Tue Aug 14, 2007 12:38 pm

SMD palette is something like this:

Image

Note that SMD able to display 1536 colors (but only 61 at once without any tricks), not 512, because it has special color mixing modes. But generally games displays only 61 colors from 512 from palette given above.

FrozenDelight
Interested
Posts: 45
Joined: Tue Aug 14, 2007 12:51 am

Post by FrozenDelight » Tue Aug 14, 2007 1:13 pm

Thanks Shiru, I think I'm starting to understand now.

The SMD palette you gave me is useful, I think I will be able to just take those colours and use them on sprites and hopfully then they'll look more like Megadrive graphics.

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Tue Aug 14, 2007 7:25 pm

Shiru wrote:SMD palette is something like this:

Image

Note that SMD able to display 1536 colors (but only 61 at once without any tricks), not 512, because it has special color mixing modes. But generally games displays only 61 colors from 512 from palette given above.
If you're using shadow/hilight mode (the only way to get 1536 colors to choose from) you can have 183 colors onscreen without any additional tricks. However, shadow/hilight mode in general is somewhat of a trick because it reuses the priority bit to differentiate between shadowed and regular tiles.
FrozenDelight wrote:When you start a new picture in GraphicsGale, it askes you to choose from 1bit, 4bit, 8bit etc. There's no 9bit.
Different kind of bit in this case. On a PC, 16-bit and higher images are generally referred to as "direct color" images. This means that for any particular pixel there's a number that directly corresponds to a color. 8-bit and lower are generally "indexed color" images which means there's a small table of colors (usually defined in 16 or 32-bits) and each pixel has a number that points to an entry in this table.

What this means is that for an indexed color image, the number of bits determines how many different colors you can use in one image whereas in a direct color image, the number of bits determines how many different colors you can choose from. For the Megadrive, that 9-bit number has to do with how many different colors you can choose from not with how many different colors can be in one image.

Anyway, you should either choose 4-bit or 8-bit depending on what you're trying to do. If you're trying to do a single character or simple object you should probably choose 4-bit because each sprite or tile on the Megadrive is basically a 4-bit indexed color image. If you're trying to do a whole scene you should use 8-bit, because the Megadrive can display these 4-bit images in more than one palette at once.

In either case, you still need to use some caution as to how you create your images to get the MD look. Does GraphicsGale support choosing colors by entering in a number? If so can you enter that number in using hex?

FrozenDelight
Interested
Posts: 45
Joined: Tue Aug 14, 2007 12:51 am

Post by FrozenDelight » Tue Aug 14, 2007 11:26 pm

Thank for the help Mask of Destiny.

Though I'm still a little confused. Yes there is a place to put in colours with numbers, here's a small video showing the colour pallete;

http://www.box.net/shared/t4k3m7p94f

Just click on the graphicsg01.rar title, or the + button, and then click on download. It's only 114.2KB. I forgot to demonstrate typing in the colour codes in, but it is possible.

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed Aug 15, 2007 2:24 am

Hmm, doesn't look like it supports entering RGB values in hex. I guess we'll have to make due with decimal numbers. So when you're adding colors to your palette the values for red, green and blue should use one of the following values:
0, 32, 64, 96, 128, 160, 192, 224

Additionally, you shouldn't add more than 61 colors to your palette.

Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Wed Aug 15, 2007 9:30 am

This makes me think to something: how we should do in an emulator to correctly handle 9bits genesis color ?

If I take my example with Genesis Plus for the gamecube, when rendering the bitmap, we use 16bits pixel data where Red and Blue are coded with 5bits and Green with 6bits (RGB565)

what was done in the original Genesis Plus, when using 16bit rendering, is that each 3bit pixel value was leftshifted by 2 (or 3 for the Green value) to have the value in RGB 565 format.

For half intensity colors (shadowed pixels), each 3bit value is only lefshifted by 1 (or 2 for Green value) and for high intensity colors (highlighted pixels) , the 3bit value is lefshifted by 1 (or 2 for Green value) and incremented by 16 (32 for Green value).

Here is how the sega manual describe each pixel intensity mode:

Image

Image

Image


That mean, in Genesis mode (RGB 9bits), the value range for each R,G,B color is something like this:

- [0-7] at normal intensity
- [0-4] at half intensity
- [4-7] at high intensity


The problem I see (am I wrong ?) with the above converting method is that the value range of each R,G,B color in 16bits mode (RGB565) will become:

- at normal intensity: [0 - 28] for Red/blue, [0-56] for green
- at half intensity: [0 - 14] for Red/Blue, [0-28] for green
- at high intensity: [16-30] for Red/Blue, [32-60] for green

which means we are not covering the full available color range in RGB565 mode (i.e [0-31] for red/blue and [0-63] for green)

In theory, I imagine that this prevent from rendering "real" white color for example, but in reality, I don't now if it is noticeable

What I did recently was to use some extrapolation tables to cover the full color range in each intensity mode (for example, at normal intensity, that means that a red value of 7 is converted to his max value in 16bit mode, i.e 31) but didn't really notice any difference on display

I simply was wondering if my "extrapolation" method was more correct that the previous one
Last edited by Eke on Tue Sep 04, 2007 8:19 pm, edited 1 time in total.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed Aug 15, 2007 10:50 am

Eke wrote:This makes me think to something: how we should do in an emulator to correctly handle 9bits genesis color ?

If I take my example with Genesis Plus for the gamecube, when rendering the bitmap, we use 16bits pixel data where Red and Blue are coded with 5bits and Green with 6bits (RGB565)

what was done in the original Genesis Plus, when using 16bit rendering, is that each 3bit pixel value was leftshifted by 2 (or 3 for the Green value) to have the value in RGB 565 format.

For half intensity colors (shadowed pixels), each 3bit value is only lefshifted by 1 (or 2 for Green value) and for high intensity colors (highlighted pixels) , the 3bit value is lefshifted by 1 (or 2 for Green value) and incremented by 16 (32 for Green value).

Here is how the sega manual describe each pixel intensity mode:

Image

Image

Image


That mean, in Genesis mode (RGB 9bits), the value range for each R,G,B color is something like this:

- [0-7] at normal intensity
- [0-4] at half intensity
- [4-7] at high intensity


The problem I see (am I wrong ?) with the above converting method is that the value range of each R,G,B color in 16bits mode (RGB565) will become:

- at normal intensity: [0 - 28] for Red/blue, [0-56] for green
- at half intensity: [0 - 14] for Red/Blue, [0-28] for green
- at high intensity: [16-30] for Red/Blue, [32-60] for green

which means we are not covering the full available color range in RGB565 mode (i.e [0-31] for red/blue and [0-63] for green)

In theory, I imagine that this prevent from rendering "real" black color for example, but in reality, I don't now if it is noticeable

What I did recently was to use some extrapolation tables to cover the full color range in each intensity mode (for example, at normal intensity, that means that a red value of 7 is converted to his max value in 16bit mode, i.e 31) but didn't really notice any difference on display

I simply was wondering if my "extrapolation" method was more correct that the previous one
where did you got that sega document ? i never saw this paper and really it helps a lot to understand how shadow and hilight mode work. In Gens, i deducted it from tests between the emulator and real hardware.
About the color method, i'm doing something which have his logic :
- the 3 bits 0 level (min) genesis color is coded by the 5/6 bits 0 level (min) color.
- the 3 bits 7 level (max) genesis color is code by the 5/6 bits 31 level (max) color.
0-7 range on genesis gives a 0-31/63 level range on PC. With this method your black and your white is perfect. I believe genesis can display perfect white so i think this method is accurate.

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed Aug 15, 2007 5:05 pm

I don't think that document is entirely correct. I could have sworn that hilight white was brigther than regular white. Maybe I'm misremembering.

Post Reply