BryanMcPhail.com

Professional software development, amateur BMW tinkering, old arcade stuff

By

MAME – ‘Color Space’ (Data East palettes)

Here’s an odd thing, I added a bunch of the mid-eighties Data East games to MAME around 1997-1999 – and just today realised the colors in many of them have been subtly wrong all this time.  In fact I suspect this might affect quite a lot of games in MAME.  The problem is a long-standing assumption that games with a palette RAM will emit a linear analog RGB signal proportional to the digital value.  But on the real hardware – many don’t.

Games such as Karnov, Gondomania, Real Ghostbusters, etc, use 4 bits per color channel – these 4 digital bits then feed into a resistor network to create an analog signal for the RGB monitor, a simple DAC in other words.  For these games the resistor network is a 12pin custom Data East part marked RM-C3.  The values are 220 ohms (MSB), 470 ohms, 1 kohm, 2.2 kohm (LSB).

IMG_2445palette

So, with those values it’s not actually a linear conversion – the high bit has slightly more weighting than you would expect, the low bits have slightly less.  The picture below shows how the colors actually should look when expanded to a 24 bit PC display.  Each column has the linear conversion on the left, and the corrected non-linear on the right.

test

Look, I said it was subtle :)

The in-game difference is subtle as well, but it’s there on the Gondomania gameplay ground, or the shadowed greens on the title screen.  Shackled looks a little more saturated.  Oscar a little more detail.  Ultimately this is a tiny change, but it does reflect the original hardware a little more which is what MAME is about.

00000000_new

00010001_new

00000000_new

00000000_new

00010001_new

 

One Response to MAME – ‘Color Space’ (Data East palettes)

  1. John Boehm says:

    This is so…cool. Takes me back to my beginning programming days, where we wrote code on 8080 microprocessors and hand-drew circuit designs like this. The end result of your work is (truly) subtle; but at it’s heart, this is what MAME is all about. Great work.

Leave a Reply to John Boehm Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>