OSSC + pce rgb palette LUT

The place for all discussion on gaming hardware
Post Reply
nightz85
Posts: 10
Joined: Mon Feb 10, 2020 5:27 pm

OSSC + pce rgb palette LUT

Post by nightz85 »

Hello everyone :)
I got myself a pce duo last month and immediately thought about modding it to RGB. While looking for info I discovered the palette issue and what causes it (thanks furrtek and others for the research!). I then thought about trying to patch this on OSSC and so I did a little reverse LUT mod to my ossc firmware to see where it could go. Well, I have a build now that I need more testers and comparisons, hopefully to see if this can work at the end. I introduced a new flag on the Compatibility menu for turning the PCE modification on and another flag to adjust it so if anyone here wants to test the RGB output with their composite (or better, s-video) outputs and help me you are welcome :)

Disclaimer: Only consider this if you have a way to revert your OSSC back to 1.80 firmware with a JTAG in case things go south, I only tested this on my two ossc units. I'm not responsible for any damage to your hardware.

The firmware is at https://onedrive.live.com/?redeem=aHR0c ... 0e&o=OneUp

It requires a legacy OSSC with the resistor mod required to update to 1.8 (the version with shadow masks and lumacode).
After pluggin the PCE to the SCART connection I did the following configs:

Video in opt:
pre-adc gain 10
clamp/alc offset 0
alc v filter 1 lines
alc h filter 2 pixels
lumacode off

Compatibility:
pce palette on
pce offset 6 [change this until you feel its 'right']

One can change the individual channels gain or the pre-adc / filters in order to chase better results but lets see where it goes. Thanks :)
Also if you think this is impossible or somehow a bad idea let me know :) I'm a noob regarding video signals so I have mostly no clue about the problems (other than signal errors/noise).
charlizardon
Posts: 23
Joined: Wed Mar 04, 2020 12:05 pm

Re: OSSC + pce rgb palette LUT

Post by charlizardon »

Very interesting.

What does the flag do exactly?

Also, could you configure the fw as a 2nd firmware as per the latest 1.20 update? That way your fw could be sideloaded without wiping the latest default fw. I'll gladly try it with my base PCE (+ EDFX) and RGB modded Duo if you do.
nightz85
Posts: 10
Joined: Mon Feb 10, 2020 5:27 pm

Re: OSSC + pce rgb palette LUT

Post by nightz85 »

So...the flag activates a code that takes the RGB input (from the ossc TVP7002) and transforms it back to the 9 bit index to take the colors of the LUT table furrtek and others reverse engineered.

Code: Select all


              ________________
VDC Port ---> |              |                           | R DAC
CPU Port <-|  | Palette RAM  | ------------------------> | G DAC
              |  (9 bit RGB) |            |              | B DAC
              |______________|            |
                                          |
                                 |----------------|
                                 | RGB to YUV LUT |
                                 |       ROM      |----> | Y DAC
                                 |----------------|      | U DAC
                                                         | V DAC

It takes each channel and divide it by 36 and then OR the results to make the 9 bit value. Hence why sometimes gain is needed and some signal cleaning too (because of noise / inaccuracies of the cable).
I'll try the second firmware as I never did that (and its a good idea!) and will update this post when I have some results.
I'm still waiting for a AMP board I bought (to do the RGB mod) to arrive so I can test this locally (so far I only tested with the mister fpga core outputting native RGB, and it looks ok on my tv but dunno if its precise).
nightz85
Posts: 10
Joined: Mon Feb 10, 2020 5:27 pm

Re: OSSC + pce rgb palette LUT

Post by nightz85 »

Ok so with the help of marqs I generated a 2nd firmware (the sec one).
https://1drv.ms/f/c/4b0117f8503301c7/Ig ... o?e=iBbqWS

Link for both of them. Please let me know what you think
charlizardon
Posts: 23
Joined: Wed Mar 04, 2020 12:05 pm

Re: OSSC + pce rgb palette LUT

Post by charlizardon »

The firmware seems stable. Good job on that!

I did some basic testing the other night and the results are definitely promising.

The main issue is dialing in gain and PCE offset to avoid clipping. I had no luck trying your suggested offset, but eventually could settle on a happy medium. Still haven't tried comparing with composite, nor have I tried it on my Duo with its less sofisticated RGB solution.

Will update once I get time to do more testing.
nightz85
Posts: 10
Joined: Mon Feb 10, 2020 5:27 pm

Re: OSSC + pce rgb palette LUT

Post by nightz85 »

Hey thanks! This modification is fairly small so that's why its so stable :)
I need to understand better whats happening and if I can somehow improve the signal that's coming from the TVE7002 but I'll keep digging.
My RGB amp board should arrive next week so I'll probably have a modded duo to test as well (it appears to me the signal that comes from the mister is too pure/high quality - or is it my cable?)
Post Reply