png2mo5 converts PNG files to Thomson format. The only supported mode is the standard MO5/TO7 one. No bitmap16 and other fun stuff, currently.

Get the source code from my SVN repository and compile it using make. libpng is needed.

It is very easy to use:

png2mo5 [options] input.png output.bin

  • The input must be a 16-color PNG file. If color constraints can't be matched, warnings are printed.
  • The output file is a standard DECB binary with 4 chunks:
    • First chunk switches to FORME memory by writing to A7C0
    • Second chunk is the pixel data
    • Third chunk switches to COLOR memory
    • Fourth chunk is the color data
  • There are currently two options:
    • -t: Enable TO mode. Puts the color data in the right order for Thomson machines with transcoding disabled (TO7/70 compatible)
    • -f: Enable MO5 2nd generation glitch fixup. My 2nd generation MO5 has a timing issue where the color for a GPL will bleed to the next one. This option can be used to avoid this issue by making sure the last bit of a GPL and the first bit of the next GPL are both the same value (by swapping the foreground and background colors as needed). This, however, makes the generated data a bit more unpredictable. This is why the f option takes a number argument. You give it the number of the “background” color and it will try to use this color as the background one whenever possible (at the start of each line and whenever there is a GPL with only one color). This makes the generated data more readable and allows you to try overlaying some effect above the picture more easily.

If you need to extract the separate pages (pixel/color) from the DECB file, you can use binxploder which was designed for this purpose.

documentations/png2mo5.txt · Last modified: 2015/02/28 18:08 by 127.0.0.1
CC0 1.0 Universal
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0