kopia lustrzana https://github.com/hoglet67/RGBtoHDMI
Add Spectrum RGBI palette and update profiles
rodzic
9c4b74b7de
commit
e266bcadfa
42
src/osd.c
42
src/osd.c
|
@ -78,8 +78,9 @@ static const char *palette_names[] = {
|
|||
"RGB",
|
||||
"RGBI",
|
||||
"RGBI (CGA)",
|
||||
"RGBI (Spectrum)",
|
||||
"RGBrgb (CPC/Spec)",
|
||||
"RrGgBb (EGA)",
|
||||
"RGBrgb (CPC/Spect.)",
|
||||
"Mono (MDA/Hercules)",
|
||||
"Atom MKI Card",
|
||||
"Atom MKI Card Full",
|
||||
|
@ -1273,11 +1274,10 @@ void osd_update_palette() {
|
|||
case PALETTE_RGB:
|
||||
break;
|
||||
case PALETTE_RGBI:
|
||||
m = (num_colours == 16) ? 0x08 : 0x10; // intensity is actually on lsb green pin on 9 way D
|
||||
r = (i & 1) ? 0xaa : 0x00;
|
||||
g = (i & 2) ? 0xaa : 0x00;
|
||||
b = (i & 4) ? 0xaa : 0x00;
|
||||
if (i & m) {
|
||||
if (i & 0x10) { // intensity is actually on lsb green pin on 9 way D
|
||||
r += 0x55;
|
||||
g += 0x55;
|
||||
b += 0x55;
|
||||
|
@ -1296,11 +1296,10 @@ void osd_update_palette() {
|
|||
break;
|
||||
|
||||
} else {
|
||||
m = (num_colours == 16) ? 0x08 : 0x10; // intensity is actually on lsb green pin on 9 way D
|
||||
r = (i & 1) ? 0xaa : 0x00;
|
||||
g = (i & 2) ? 0xaa : 0x00;
|
||||
b = (i & 4) ? 0xaa : 0x00;
|
||||
if (i & m) {
|
||||
if (i & 0x10) { // intensity is actually on lsb green pin on 9 way D
|
||||
r += 0x55;
|
||||
g += 0x55;
|
||||
b += 0x55;
|
||||
|
@ -1311,6 +1310,27 @@ void osd_update_palette() {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case PALETTE_RGBIHALF:
|
||||
r = (i & 1) ? 0x7f : 0x00;
|
||||
g = (i & 2) ? 0x7f : 0x00;
|
||||
b = (i & 4) ? 0x7f : 0x00;
|
||||
if (i & 0x10) { // intensity is actually on lsb green pin on 9 way D
|
||||
r += 0x80;
|
||||
g += 0x80;
|
||||
b += 0x80;
|
||||
}
|
||||
break;
|
||||
|
||||
case PALETTE_RGB3LEVEL:
|
||||
r = (i & 1) ? 0x7f : 0x00;
|
||||
g = (i & 2) ? 0x7f : 0x00;
|
||||
b = (i & 4) ? 0x7f : 0x00;
|
||||
r = (i & 0x08) ? (r + 0x80) : r;
|
||||
g = (i & 0x10) ? (g + 0x80) : g;
|
||||
b = (i & 0x20) ? (b + 0x80) : b;
|
||||
break;
|
||||
|
||||
case PALETTE_RrGgBb:
|
||||
r = (i & 1) ? 0xaa : 0x00;
|
||||
g = (i & 2) ? 0xaa : 0x00;
|
||||
|
@ -1319,13 +1339,14 @@ void osd_update_palette() {
|
|||
g = (i & 0x10) ? (g + 0x55) : g;
|
||||
b = (i & 0x20) ? (b + 0x55) : b;
|
||||
break;
|
||||
|
||||
case PALETTE_MDA:
|
||||
r = (i & 0x20) ? 0xaa : 0x00;
|
||||
r = (i & 0x10) ? (r + 0x55) : r;
|
||||
g = r;
|
||||
b = r;
|
||||
break;
|
||||
|
||||
|
||||
case PALETTE_ATOM_MKI: {
|
||||
int luma_scale = 81;
|
||||
int black_ref = 770;
|
||||
|
@ -1482,15 +1503,6 @@ void osd_update_palette() {
|
|||
}
|
||||
break;
|
||||
|
||||
case PALETTE_RGB3LEVEL:
|
||||
r = (i & 1) ? 0x7f : 0x00;
|
||||
g = (i & 2) ? 0x7f : 0x00;
|
||||
b = (i & 4) ? 0x7f : 0x00;
|
||||
r = (i & 0x08) ? (r + 0x80) : r;
|
||||
g = (i & 0x10) ? (g + 0x80) : g;
|
||||
b = (i & 0x20) ? (b + 0x80) : b;
|
||||
break;
|
||||
|
||||
case PALETTE_MONO1:
|
||||
m = 0.299 * r + 0.587 * g + 0.114 * b;
|
||||
r = m; g = m; b = m;
|
||||
|
|
|
@ -27,8 +27,9 @@ enum {
|
|||
PALETTE_RGB,
|
||||
PALETTE_RGBI,
|
||||
PALETTE_RGBICGA,
|
||||
PALETTE_RrGgBb,
|
||||
PALETTE_RGBIHALF,
|
||||
PALETTE_RGB3LEVEL,
|
||||
PALETTE_RrGgBb,
|
||||
PALETTE_MDA,
|
||||
PALETTE_ATOM_MKI,
|
||||
PALETTE_ATOM_MKI_FULL,
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=1,1,1
|
||||
geometry=56,28,272,208,320,240,3,8,7159090,456,0,262,4,0
|
||||
palette=9
|
||||
palette=10
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,1,1,1,1,1,1,1,0,8,0,0,1,0,0,0,0
|
||||
geometry=8,11,304,240,304,240,3,8,7159090,456,0,262,4,0
|
||||
palette=9
|
||||
palette=10
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,1,1,1,1,1,1,1,0,8,0,0,1,0,0,0,0
|
||||
geometry=60,11,304,240,304,240,3,8,7159090,456,0,262,4,0
|
||||
palette=9
|
||||
palette=10
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,0,0,0,0,0,0,0,0,6,7,1,0,0,0,0,0
|
||||
geometry=48,0,640,350,672,350,0,8,18013483,808,4500,368,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,5,5,5,5,5,5,5,0,6,6,1,0,0,0,0,0
|
||||
geometry=28,1,640,350,656,350,0,8,18013483,768,4500,366,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,3,3,3,3,3,3,3,0,6,7,1,0,0,0,0,0
|
||||
geometry=44,59,640,350,656,358,0,8,25175000,800,4500,449,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,3,3,3,3,3,3,3,0,6,3,1,0,0,0,0,0
|
||||
geometry=52,90,640,400,656,368,0,8,28322000,800,4500,449,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,4,4,4,4,4,4,4,0,6,8,1,0,0,0,0,0
|
||||
geometry=48,0,720,350,720,350,0,8,18014000,981,4500,369,1,0
|
||||
palette=5
|
||||
palette=6
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,2,2,2,2,2,2,2,0,6,7,1,0,0,0,0,0
|
||||
geometry=56,31,640,480,656,496,0,8,25175000,800,4500,525,0,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,3,3,3,3,3,3,3,0,6,8,1,0,0,0,0,0
|
||||
geometry=48,33,720,400,736,416,0,8,28322000,900,4500,449,2,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,4,4,4,4,4,4,4,0,6,9,1,0,0,0,0,0
|
||||
geometry=28,0,640,350,672,350,0,8,16257000,744,4500,365,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,0,0,0,0,0,0,0,0,6,8,1,0,0,0,0,0
|
||||
geometry=32,0,720,350,720,350,0,8,16000000,864,4500,370,3,0
|
||||
palette=5
|
||||
palette=6
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,0,0,0,0,0,0,0,0,6,8,1,0,0,0,0,0
|
||||
geometry=32,0,720,350,720,350,0,8,16000000,882,4500,370,3,0
|
||||
palette=5
|
||||
palette=6
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,0,0,0,0,0,0,0,0,6,8,1,0,0,0,0,0
|
||||
geometry=32,0,720,350,720,350,0,8,16257000,882,4500,370,3,0
|
||||
palette=5
|
||||
palette=6
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,4,4,4,4,4,4,4,0,6,9,1,0,0,0,0,0
|
||||
geometry=28,0,640,350,672,350,0,8,16257000,744,4500,365,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,3,3,3,3,3,3,3,0,6,7,1,0,0,0,0,0
|
||||
geometry=56,59,640,350,656,368,0,8,25175000,800,4500,449,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,3,3,3,3,3,3,3,0,6,3,1,0,0,0,0,0
|
||||
geometry=52,90,640,400,656,368,0,8,28322000,800,4500,449,1,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,2,2,2,2,2,2,2,0,6,7,1,0,0,0,0,0
|
||||
geometry=56,31,640,480,656,496,0,8,25175000,800,4500,525,0,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sampling=0,3,3,3,3,3,3,3,0,6,9,1,0,0,0,0,0
|
||||
geometry=56,33,720,400,736,416,0,8,28322000,900,4500,449,2,0
|
||||
palette=3
|
||||
palette=5
|
||||
|
|
Ładowanie…
Reference in New Issue