MR image: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
==About== | ==About== | ||
A MR image is an image format solely used inside an [[IP.BIN]] file to show off a logo during the boot screen process of the Sega Dreamcast. [[File:Windows CE boot screen.png|thumb|Games powered by Windows CE boot screen]]This image format was used in commercialized Dreamcast games utilizing Windows CE SDK where we see a "Powered by Microsoft Windows CE" logo. It is now commonly used in homebrew to distinguish the creator(s) of the application or to disassociate the application being produced by or under license from Sega. Since [[IP.BIN]] is restricted to a 32k file size and the MR image must be inserted into that file in order to be displayed during the boot process, there are a couple of guidelines the MR image must meet to be shown during the boot process. | A MR image is an image format solely used inside an [[IP.BIN]] file to show off a logo during the boot screen process of the Sega Dreamcast. [[File:Windows CE boot screen.png|thumb|Games powered by Windows CE boot screen]]This image format was used in commercialized Dreamcast games utilizing Windows CE SDK where we see a "Powered by Microsoft Windows CE" logo. It is now commonly used in homebrew to distinguish the creator(s) of the application or to disassociate the application being produced by or under license from Sega. Since [[IP.BIN]] is restricted to a 32k file size and the MR image must be inserted into that file in order to be displayed during the boot process, there are a couple of guidelines the MR image must meet to be shown during the boot process. | ||
<br/> | |||
'''MR Image must be:''' | '''MR Image must be:''' | ||
Line 8: | Line 8: | ||
* Less than 8192 bytes to fit in a IP.BIN | * Less than 8192 bytes to fit in a IP.BIN | ||
* The transparent color is #c0c0c0, or 192, 192, 192 in RGB | * The transparent color is #c0c0c0, or 192, 192, 192 in RGB | ||
<br | <br/> | ||
==File Format== | ==File Format== | ||
The file format is composed of three sections: '''Header''', '''Palette''', and the '''Image Data'''. All of the data written in the file is in '''little-endian''' format. | |||
A MR file starts off with a 30 byte header. | A MR file starts off with a 30 byte header. | ||
=== | ===Header=== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 19: | Line 21: | ||
| 2 bytes || "MR" | | 2 bytes || "MR" | ||
|- | |- | ||
| 4 bytes || Total | | 4 bytes || Total file size | ||
|- | |- | ||
| 4 bytes || Crap | | 4 bytes || Crap (fill with 0's) | ||
|- | |- | ||
| 4 bytes || Image | | 4 bytes || Image data offset in bytes (Header size + Palette size) | ||
|- | |- | ||
| 4 bytes || Image | | 4 bytes || Image width | ||
|- | |- | ||
| 4 bytes || Image | | 4 bytes || Image height | ||
|- | |- | ||
| 4 bytes || Crap | | 4 bytes || Crap (fill with 0's) | ||
|- | |- | ||
| 4 bytes || Amount of colors in palette | | 4 bytes || Amount of colors in palette | ||
|} | |} | ||
===Palette=== | ===Palette=== | ||
The header is followed by the image palette. The palette is composed of palette entries where each palette entry is 4 bytes long and is stored as BGRA. The alpha byte goes unused. | The header is followed by the image's palette. The palette is composed of palette entries where each palette entry is 4 bytes long and is stored as BGRA. The alpha byte goes unused. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 46: | Line 48: | ||
Lastly, the image data. The image data is compressed using RLE. | Lastly, the image data. The image data is compressed using RLE. | ||
==Encoding== | ==Encoding Algorithm== | ||
==Decoding== | ==Decoding Algorithm== |
Revision as of 07:09, 11 January 2020
About
A MR image is an image format solely used inside an IP.BIN file to show off a logo during the boot screen process of the Sega Dreamcast.
This image format was used in commercialized Dreamcast games utilizing Windows CE SDK where we see a "Powered by Microsoft Windows CE" logo. It is now commonly used in homebrew to distinguish the creator(s) of the application or to disassociate the application being produced by or under license from Sega. Since IP.BIN is restricted to a 32k file size and the MR image must be inserted into that file in order to be displayed during the boot process, there are a couple of guidelines the MR image must meet to be shown during the boot process.
MR Image must be:
- 320x90 or less
- Max 128 colors
- Less than 8192 bytes to fit in a IP.BIN
- The transparent color is #c0c0c0, or 192, 192, 192 in RGB
File Format
The file format is composed of three sections: Header, Palette, and the Image Data. All of the data written in the file is in little-endian format.
A MR file starts off with a 30 byte header.
Header
Size | Contents |
---|---|
2 bytes | "MR" |
4 bytes | Total file size |
4 bytes | Crap (fill with 0's) |
4 bytes | Image data offset in bytes (Header size + Palette size) |
4 bytes | Image width |
4 bytes | Image height |
4 bytes | Crap (fill with 0's) |
4 bytes | Amount of colors in palette |
Palette
The header is followed by the image's palette. The palette is composed of palette entries where each palette entry is 4 bytes long and is stored as BGRA. The alpha byte goes unused.
Palette Entry | |||
---|---|---|---|
B | G | R | A |
In total, the byte size of your palette should be number of colors * 4.
Image Data
Lastly, the image data. The image data is compressed using RLE.