Page 1 of 1

Color analysis between different emulators/editors

Posted: Wed May 23, 2018 8:10 am
by ExtraordinaryBen
So I'm finally getting around to developing my own Palette/Sprite Editor. (Currently prototyping in Python using the PyQt library. Since I run Linux I intend to make it cross-platform.) One of the things I'm currently trying to address is determining how best to represent (or approximate) 9-bit RGB/BGR values as modern day 24-bit RBG values.

I was curious if there was an established community standard when representing Genesis/MegaDrive colors on modern hardware? (Gotta tread lightly, don't want to start another Colors War... Haha!)

Sigflup's Mega Happy Sprite editor (among other editors,) scales values 0-7 by 36. (floor[255 / 7] = 36.) This gives a "pure white" of 0xFCFCFC.

I can replicate the Regen emulator's color representation by scaling values by 32. This gives a "pure white" of 0xE0E0E0. (Gens/GS gives 0xE0E8E0 for whatever reason... All green values seems to be off scaled in Gens/GS compared to Regen.)

The BlastEm emulator gives a genuine "pure white" of 0xFFFFFF. (Mapping table is described here: viewtopic.php?p=27360#p27360)

Kega-Fusion's color representation can be replicated by the following:
mapped_color = (value * 32) + value. This gives a "pure white" of 0xE7E7E7.

Tests on the video timings back in 2010 suggest that the color stepping/scale is actually 34: viewtopic.php?p=10067#p10067 This would give a "pure white" of 0xEEEEEE.

In the picture below I'm using the TANGLEWOOD 0.8.01 Demo as a color reference between the emulators and the official clip of the demo on YouTube: https://www.youtube.com/watch?v=59KW8xT74eo (Not sure if the Demo was captured live or emulated.)
Screenshot from 2018-05-19 22-44-36.png
Screenshot from 2018-05-19 22-44-36.png (212.32 KiB) Viewed 6866 times
The Cyan-like color between the trees in the background is represented by the following:
  • YouTube clip: 0x13B1A5
  • BlastEm: 0x31CEAE
  • Gens/GS: 0x20C8A0
  • Regen: 0x20C0A0
  • Kega-Fusion: 0x21C6A5
Any thoughts or input would be appreciated. If anything I can always just code in a drop-down list so that the user can choose between the different color scaling profiles.

Edit: ...Annnddd I just realized it may have been better to place this in the "Video Display Processor" forum. If it seems more appropriate there, would a Mod please move this? Thanks!

Re: Color analysis between different emulators/editors

Posted: Wed May 23, 2018 8:25 am
by cero
NTSC stands for "never the same color". TVs vary enough that it doesn't matter, use whatever is convenient.

Re: Color analysis between different emulators/editors

Posted: Wed May 23, 2018 10:34 am
by TmEE co.(TM)

Re: Color analysis between different emulators/editors

Posted: Wed May 23, 2018 5:27 pm
by ExtraordinaryBen
Haha! Thank you TmEE. I discovered your thread shortly after I realized I probably posted in the wrong forum. :P

Having the cold hard numbers really helps, thanks again!

Re: Color analysis between different emulators/editors

Posted: Wed May 23, 2018 6:31 pm
by MetalliC
there is also this 315-5313 die photo https://easyzoom.com/imageaccess/ffa60d ... f3881da6ff
really interested person may try to RE video DAC part

Re: Color analysis between different emulators/editors

Posted: Wed May 23, 2018 9:31 pm
by TmEE co.(TM)
The video DAC part is figured out pretty much. There's 17 taps on a long resistor structure and each tap is turned on with a control signal to enable certain level on the color channel output. 15 MD mode levels plus two SMS mode exclusive levels.