From 31eb24c2b9824e875be68e28e792ffa4fc1172c1 Mon Sep 17 00:00:00 2001 From: David Banks Date: Sat, 9 Mar 2019 14:50:21 +0000 Subject: [PATCH] Added experimental Atom mode using Six bits to get a proper orange (with Normal CPLD) Change-Id: I72186c9bc320419ad313dff4b4f448dd23844b4e --- src/osd.c | 14 +++++++++++++- src/osd.h | 1 + src/scripts/cmdline.txt | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/osd.c b/src/osd.c index 3d97c03d..bba37675 100644 --- a/src/osd.c +++ b/src/osd.c @@ -60,13 +60,16 @@ static const char *palette_names[] = { "Atom Colour Normal", "Atom Colour Extended", "Atom Colour Acorn", - "Atom Mono" + "Atom Mono", + "Atom Experimantal" }; + static const char *palette_control_names[] = { "Off", "In Band Commands", "NTSC Artifacting" }; + static const char *vlockmode_names[] = { "Unlocked", "2000ppm Slow", @@ -893,6 +896,15 @@ void osd_update_palette() { } r = g = b = m; break; + case PALETTE_ATOM_EXPERIMENTAL: + // Six bit pixels: B1 G1 R1 B0 G0 R0 + // For the most part ignore the Mux=1 values + // Except for orange: x 1 x 0 0 1 + if ((i & 0x17) == 0x11) { + // orange + r = 160; g = 80; b = 0; + } + break; } } if (active) { diff --git a/src/osd.h b/src/osd.h index 75521a80..0c4d2c83 100644 --- a/src/osd.h +++ b/src/osd.h @@ -38,6 +38,7 @@ enum { PALETTE_ATOM_COLOUR_EXTENDED, PALETTE_ATOM_COLOUR_ACORN, PALETTE_ATOM_MONO, + PALETTE_ATOM_EXPERIMENTAL, NUM_PALETTES }; diff --git a/src/scripts/cmdline.txt b/src/scripts/cmdline.txt index 26245d3e..32dd45a0 100644 --- a/src/scripts/cmdline.txt +++ b/src/scripts/cmdline.txt @@ -195,6 +195,9 @@ sampling06=3 sampling7=0,2,2,2,2,2,2,0,8,5 info=1 palette=0 deinterlace=6 scanli # Here's an example that might work with an Atom (CPLDv1) (wider border, sub-sample pixels) #sampling=1 geometry=0,26,69,212,552,424,4,85909091,5472,5000,2 nbuffers=2 mux=1 m7disable=1 # +# Here's an example that might work with an Atom (CPLDv3 using 6-bit/pixel sampling) +#sampling=1,1,1,1,1,1,1,0,8,0,1 geometry=11,11,38,240,304,240,8,57272720,3648 palette=14 nbuffers=2 m7disable=1 +# # Here's an example that might work with an Atom (Atom CPLD) #sampling=0 geometry=19,11,76,240,608,480,8,57272720,3648 palette=10 nbuffers=2 m7disable=1 keymap=1233232 #