MiSTer-devel / C64_MiSTer

111 stars 57 forks source link

Feature Request - External VPL palettes #144

Closed Retro-Nerd closed 1 year ago

Retro-Nerd commented 1 year ago

External palettes support would be nice. I really like the Colodore palette. Looks awesome using the Ultimate 64 FPGA Board. Any chance for an implementation? Presets with 50 and 75% saturation seems a good choice. The .vpl files can be found in the Vice emulator package, in the "C64" folder.

https://www.colodore.com/

sorgelig commented 1 year ago

Generally speaking i'm against making Christmas Tree from a serious core such as C64. There are official C64 colors and they are pretty much defined.

sorgelig commented 1 year ago

Btw, if you use HDMI output, then there are new options in INI to control brightness/contrast. Additionally there is a gamma control option in OSD.

Retro-Nerd commented 1 year ago

Has nothing do to with a "Christmas Tree". Pepto made a mistake many years ago in measuring the C64 colors for emulators. They look wrong and way too desaturated. With the Colodore palette he corrected this and it looks much more like a real C64, connected to a TV/CRT monitor. I know it, because i still have several real C64 machines and CRT devices.

It would be an optional feature anyway.

"Colodore vs. Pepto

This isn't my first attempt at calculating an RGB version of the VIC II palette. In 2001, I published an exemplery calculation on my website. This basic model was implemented in quite a few tools and emulators over the years. People interested in VIC II colors started just calling it pepto, as that's my nickname.

While fairly accurate for its time and an improvement to what was available previously, I wasn't ultimately satisfied with how some colors looked, when using higher saturation. I had a hard time getting stable read-outs on the vectorscope originally, as it was very picky about signals not following specs precisely. In retrospect I think, that maybe the hanover bars might have leaked into my measurements, which could explain the slightly phase-shifted nature of the inaccuracy.

Long story short, I found back my motivation to work on this, when I learned that some guys were doing a book with mostly C64 graphics of the demoscene. I found that re-adjusting the purple/green angle and phase-shifting all colors a tiny notch, resulted in a more accurate representation of the VIC II colors. I also got to grips with calculating gamma values and was able to contribute to the book just in time."

https://www.pepto.de/projects/colorvic/

sorgelig commented 1 year ago

Well, i'm open to fix the palette if there is a error there.

Retro-Nerd commented 1 year ago

Well, maybe he couldn't do it better in 2001. I'm glad that he took the chance in 2016 to create a much more real life palette for the C64. I don't mind if you stay with his old settings, but an optional Colodore setting would be nice. Here is a little comparison.

Pepto PAL

Pepto Colors PAL (measured 2001)

Colodore

Colodore PAL (measured 2016)

Colodore (left) vs Pepto Start Screen Colodore vs Pepto Palette

Test Pattern (Menu) - Colodore left/Pepto right Colodore vs PAL Vergleich - Testbild Progamm Menü

sorgelig commented 1 year ago

That's something wrong with you TV or Monitor. On HDMI without any tweaks i see left picture with current palette. At least Basic screen looks like normal bluish. There is no such purplish tint like on the right.

sorgelig commented 1 year ago

I have no idea why you show screens from emulator as an evidence.

Retro-Nerd commented 1 year ago

Have you actually checked what colors you've implemented? On my LG C9 OLED Mister is closer to Pepto. It's not that purplish-blue like Pepto shown in the emulation screens, but the C64 Mister Core looks definitely more like it than Colodore. There's nothing wrong with my TV. Maybe it's i'm be too picky though.

"I have no idea why you show screens from emulator as an evidence."

Because taking photos from a Mister connected to a TV/Monitor doesn't make sense. This would show wrong colors anyway.

Retro-Nerd commented 1 year ago

Ok, another try with real photos, because there are differences:

Top = Ultimate Board with Colodore Palette loaded, no tweaks, SDR on my LG OLED Bottom = Mister C64 Core, no tweaks, SDR on my LG OLED (pretty much the same settings)

Example 1:

Ultimate 64 Board with Colore Palette (SDR-No Tweaks- LG OLED)_1

Mister C64 Core (SDR-No Tweaks-LG OLED)_1

Example 2:

Ultimate 64 Board with Colore Palette (SDR-No Tweaks- LG OLED)_2 Mister C64 Core (SDR-No-Tweaks-LG OLED)_2

sorgelig commented 1 year ago

Ok, another try with real photos, because there are differences:

no difference basically. U64 version just uses "popped" colors. Upper can become bottom and opposite by simple brightness/contrast adjustment on TV. It's like Chinese/Korean phones by default use eye burning colors. So it pretends to be a "fresh" and "clear" colors while it's not.

Sorry, i don't buy it. There is no difference in general. I have real C64 too. I never saw reddish-brown on my C64. If you really like those popped colors, you can make it by gamma correction file if you don't want to adjust it on your TV.

rsn8887 commented 1 year ago

@Retro-Nerd If you look in the source code you can see MiSTer is already using exactly the accurate colors from 2016 that you want, this has been the default in the core for years. Yes, many years ago it was using the old wrong purple pepto colors from 2001, but this has long been fixed. See also here: https://github.com/MiSTer-devel/C64_MiSTer/pull/56

and here is the commit that fixed colors in January 2021, so unless you are using a core that is more than 2 years old, MiSTer already has the colors you mentioned from 2016: https://github.com/MiSTer-devel/C64_MiSTer/commit/4c0f08584916b1cac4cb7f5dccd6aa8d2e065a2a

I don't know why you show U64 as examples, it might use different colors, not the accurate ones from the 2016 publication. Better to stick with the accurate research colors from 2016. If anything, you should not compare to U64 but to a real original C64.

BTW my LG computer monitor also doesn’t show the faint colors from your example. Here is my HDMI capture from current MiSTer Core (capture card does RGB to YUY conversion, but gives almost exactly what is shown on screen):

image

And here is a .png screenshot saved on MiSTer itself:

20230201_154634-screen

Compared to your colodore example it is very close. In fact the programmed in RGB values in the MiSTer source are exactly the 2016 colors from here, same link you mention https://www.pepto.de/projects/colorvic/

so your examples seem to use some different colors for some reason, not the exact 2016 researched colors.

Here's one of your screenshots of what you deem as "good" colors in your opinion that you posted above, reproduced for comparison:

image

Retro-Nerd commented 1 year ago

I guess you've implemented the conservative 50% saturation from the Colodore image settings generator. Anyway. I did some tinkering with the Mister.ini saturation and contrast boost (video processing settings), together with the LG OLED "white balance" setting of "warm3". This mimics my Sony Trinitron CRT TV pretty close. Case closed (from my side, as it was closed anyway before. )

"so your examples seem to use some different colors for some reason, not the exact 2016 researched colors."

These are actually crappy smartphone pics. Even a slightly different camera angle can mess them up, colorwise. And yes i prefer a bit more pop, but no "Christmas Tree" look. Guess on the Ultimate i've loadded a 70% Colodore palette saturation.

btw: There are significant differences through the C64 board revisions.

Older 407 Rev: The image is really colorful and vibrant, even in default TV settings. Newer 469 Rev: The image is way more desaturated, almost dull/drab in default TV settings.

BluesM18A1 commented 8 months ago

How hard can it be to just let people load in their own palette file like you can with the NES core? People are going to be arguing about what the """correct""" colors are for the VIC-II until the end of time just like with the NES PPU, and since different board/chip revisions combined with different monitors are always going to produce different results, you may as well let people customize it on their own.