Dreamcast Issues with creating images for Dreamcast logo/copyright screen with ipcreate

New member
Joined
Mar 17, 2020
Messages
3
Reaction score
0
Points
1
Greetings. I just started dabbling into Dreamcast development, and one of the things I've been tinkering with is creating an image that can go on the Sega copyright logo screen (IP.BIN). However, I'm having trouble with color limitations for it. In particular, I'm having difficulty figuring out how ipcreate counts colors in an image.

I'm trying to get the color count below 128 for this very simple test image I made (it's lazy, but I'm just trying to get a feel for what needs to be done) so that ipcreate will convert the image to the mr format.

Test.png

The image above already has less than 128 colors (125, to be precise), but feeding this into ipcreate gives me the error that the image is more than 128 colors. So I started to reduce it little by little. I kept reducing the number of colors the image has, but it kept telling me that there were more than 128 colors in the image. Finally, after reducing the image to just three colors, I get this message
Code:
Loaded C:\temppath\~iplogo.tmp, 320 x 90
Found 95 colors
Compressing 28800 bytes to 20039 bytes.
This will NOT fit in a normal ip.bin - it is 11847 bytes too big!
Writing C:\temppath\~tempmr.tmp
Done!
ipcreate.exe: Error when creating the logo file. Aborted.
Just for reference, this is the image that ipcreate is complaining about (both images are 8-bit in color):

Test2.png

With this knowledge in mind, I tried something different, and created an indexed image in aseprite (a sprite creation program designed to make images with limited palettes). I would draw simple lines with different colors, and it seemed totally random how many colors ipcreate would detect when I did so. Generally, it seemed like single-width lines made the count go up by two, while lines of width 2 or greater would count as four colors. The only time one color was added was when I drew a line of an existing color on top of another line of a different color (where the color count shouldn't be going up at all).

Below is the test image. It clearly shows 5 solid, colors without any antiailiasing (white, black, red, blue, and magenta), but ipcreate reports it as 15 colors despite that.

Test3.png

Overall, what I'm trying to ask is this: how does ipcreate determine colors? Is this a glitch in the conversion from png to mr format? Is there any program where I can create mr images directly (without conversion) or in a way where ipcreate could accurately determine the number of colors an image uses? I've tried feeding multiple images created from Gimp, paint.net, and aseprite, and in both png and bmp formats, but all of them give the same, seemingly random results with reduced colors.

I realize this is probably only useful for the boot splash screen (IP.BIN), but it would help me greatly to know if I'm going about this in the wrong way. I haven't been able to find anything on how color count is determined in the programs source code or online. Let me know if any more information is needed. Thanks!
 
Last edited:
Well-known member
Registered
Joined
Aug 16, 2019
Messages
206
Reaction score
119
Points
43
Did you use the family guy pack ?
When I used it, i had good result even if i never check how many colors my pictures had.
 
2049 Donator
Donator
Registered
Joined
May 31, 2019
Messages
330
Reaction score
322
Points
63
Did you use the family guy pack ?
When I used it, i had good result even if i never check how many colors my pictures had.
Yeah, there's png2mr included in my Selfboot pack. Just read the readme for guidance on how to use it. Should be very simple and works great as long as your PNG has 125 colors or less. Any decent graphics program (e.g. gimp) can ensure that for you.

Maybe you only use a few colors but your palette has many more than that.
 
Last edited:
New member
Joined
Mar 17, 2020
Messages
3
Reaction score
0
Points
1
Maybe you only use a few colors but your palette has many more than that.
I checked with GIMP to make sure there were only < 128 colors, and that shows the number of colors correctly. aseprite also literally has a pallet creator, which gave me complete control over the image palette, which only had the five colors mentioned in my previous post.

1584588200187.png

Luckily, I did manage to find a tool FamilyGuy alluded to (it was called mrtool, which I found a separate download for and seems to be an updated version of png2mr), which converts bmp images to mr format. I used it, and it does a much better job of determining the color count compared to ipcreate, so I'll be using that, then injecting the mr file into the IP.BIN file I create with ipcreate as a workaround. I was finally able to get good results with another test image I created after I reduced it to 97 colors.

1584589486744.png
 
2049 Donator
Donator
Registered
Joined
May 31, 2019
Messages
330
Reaction score
322
Points
63
I checked with GIMP to make sure there were only < 128 colors, and that shows the number of colors correctly. aseprite also literally has a pallet creator, which gave me complete control over the image palette, which only had the five colors mentioned in my previous post.

View attachment 6244

Luckily, I did manage to find a tool FamilyGuy alluded to (it was called mrtool, which I found a separate download for and seems to be an updated version of png2mr), which converts bmp images to mr format. I used it, and it does a much better job of determining the color count compared to ipcreate, so I'll be using that, then injecting the mr file into the IP.BIN file I create with ipcreate as a workaround. I was finally able to get good results with another test image I created after I reduced it to 97 colors.

View attachment 6245
Idk what you're doing wrong, but that should be 2 colors.

Here's my latest selfboot pack (still very old though, 8 years!): http://shenmuesubs.sourceforge.net/download/addons/Selfboot_DATA_Pack_v1.4_by_FamilyGuy.rar

PNG2MR is in the -=Isos=- folder.

As a workaround, you could run optipng on your PNG prior to the conversion to MR to ensure optimal palette utilization.
 
Last edited:
New member
Joined
Mar 17, 2020
Messages
3
Reaction score
0
Points
1
Idk what you're doing wrong, but that should be 2 colors.

I should've mentioned, but the pink test logo is anti-aliased, hence the 97 colors. I made another logo with the test lines from before (solid, no antiailiasing), and that reported only 5 colors using mrtool, as it should.

1584592980718.png

Hope that clears things up.
 
2049 Donator
Donator
Registered
Joined
May 31, 2019
Messages
330
Reaction score
322
Points
63
I should've mentioned, but the pink test logo is anti-aliased, hence the 97 colors. I made another logo with the test lines from before (solid, no antiailiasing), and that reported only 5 colors using mrtool, as it should.

View attachment 6246

Hope that clears things up.
Yeah that makes more sense.

Your background isn't the right color though. IIRC it should be 127 or 128 gray.
 

neo

Well-known member
Joined
Feb 1, 2019
Messages
64
Reaction score
59
Points
18
Ok dcemu I posted updated png2mr for current libpng
 
Top