Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New profile selection menu plus higher resolution monitor support #311

Merged
merged 46 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6377df9
Update profiles
IanSB Feb 21, 2023
5881d9f
Add generalised menu parameter handling
IanSB Feb 22, 2023
e2a6e65
Update resolution and config files
IanSB Feb 24, 2023
9200a45
Add auto detect support for 2560x1440 monitors and improve auto overs…
IanSB Feb 24, 2023
e5ecd18
Fix issue with overscan settings not changing frame buffer
IanSB Feb 24, 2023
d48e576
Add odd / even pixel doubling option (Primarily for Superboard II)
IanSB Feb 25, 2023
ab3963c
Refactor autoswitch, debug, powerup message & num buffers
IanSB Feb 25, 2023
aef52cb
Refactor genlock speed, mode, line and adjust
IanSB Feb 25, 2023
3e2ca4c
Refactor vsync indicator, scanlines, scanline level, output colour & …
IanSB Feb 25, 2023
39fd5ac
Refactor timing set, ntsc colour, phase, type and quality
IanSB Feb 25, 2023
529b2f8
Refactor border colour, font size, mode7 deinterlace, normal deinterl…
IanSB Feb 25, 2023
810c863
Refactor profile, sub-profile, saved config & hdmi standby
IanSB Feb 25, 2023
79a1342
Refactor crop border, swap aspect, screencap size, mode7 scaling and …
IanSB Feb 25, 2023
9027eaa
Refactor palette, tint, saturation, contrast, brightness gamma, retur…
IanSB Feb 25, 2023
4eeb72e
Refactor cpu, core & sdram overclock
IanSB Feb 26, 2023
dcad46b
Refactor resolution, refresh, scaling, hdmi mode & frontend
IanSB Feb 26, 2023
8716874
Refactor set_feature
IanSB Feb 26, 2023
f2c73e8
Update resolutions
IanSB Feb 27, 2023
8a12a94
Update profiles in preparation for new select profile menu option
IanSB Feb 28, 2023
833f8bf
Add select profile menu option
IanSB Feb 28, 2023
0c875c0
Improve select profile menu to display profiles from all CPLD variants
IanSB Feb 28, 2023
e70a3b9
Update profiles for updated select profile menu option
IanSB Feb 28, 2023
e90e313
Fix profile folder names
IanSB Feb 28, 2023
4542678
Fix profile save bug
IanSB Feb 28, 2023
985db7b
Fix mode7 width bug with 16bpp overscan adjustment
IanSB Mar 1, 2023
3fc12db
Further mode7 width bugfix
IanSB Mar 1, 2023
5f04b1d
Fix mode7 OSD not clearing under certain conditions
IanSB Mar 1, 2023
e67488e
Add recently used option to profile selection menu
IanSB Mar 2, 2023
1976d6f
Rework cpld name prefix handling
IanSB Mar 2, 2023
58b9d52
Fix bug that stopped dedicated Atom converter from loading its profile
IanSB Mar 2, 2023
c32fb44
Move CPLD menu to settings and restore Test 50Hz to main menu
IanSB Mar 2, 2023
26ffd24
Rename and move some profiles plus add test profiles
IanSB Mar 2, 2023
a380d46
Remove Test_Profiles folder and adjust build script
IanSB Mar 2, 2023
3d5921e
Fix CPLD recovery menu
IanSB Mar 3, 2023
2b67fa6
Clear saved config when changing profile
IanSB Mar 3, 2023
7bb274a
Add 4K@25-30Hz resolution and update 1920x2160 resolution
IanSB Mar 3, 2023
012bc05
Update resolution names
IanSB Mar 3, 2023
0271c6f
Genlock now works with half frame rate modes
IanSB Mar 3, 2023
f9c45f9
Ensure stable phase relationship between source and Pi syncs when 4K …
IanSB Mar 3, 2023
e436c99
Drop alternate frames when display is 4K@ 25/30Hz to prevent tearing
IanSB Mar 3, 2023
c3bf702
Update resolutions
IanSB Mar 3, 2023
f5debda
Revert "Update resolutions"
IanSB Mar 3, 2023
3f8db67
Update resolutions again
IanSB Mar 3, 2023
7c7991c
Correct startup resolution
IanSB Mar 3, 2023
2457af1
Tab to space
IanSB Mar 4, 2023
92171c3
Whitespace
IanSB Mar 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
54 changes: 54 additions & 0 deletions src/capture_line_default_sixbits_8bpp_16bpp.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.text

.global capture_line_default_sixbits_8bpp
.global capture_line_default_odd_even_sixbits_8bpp
.global capture_line_default_sixbits_16bpp

.extern palette_data_16
Expand Down Expand Up @@ -115,6 +116,59 @@ preload_capture_line_default_sixbits_8bpp:

.ltorg



// *** 8 bit ***
.align 6
b preload_capture_line_default_odd_even_sixbits_8bpp
capture_line_default_odd_even_sixbits_8bpp:
push {lr}
SETUP_VSYNC_DEBUG_R11_R12
SKIP_PSYNC_NO_OLD_CPLD
mov r1, r1, lsr #2
loop_oe8bpp:
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_LOW_BITS_ODD_EVEN_8BPP_WIDE r11 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_HIGH_BITS_ODD_EVEN_8BPP_WIDE r5 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_LOW_BITS_ODD_EVEN_8BPP_WIDE r12 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_HIGH_BITS_ODD_EVEN_8BPP_WIDE r6 // input in r8

WRITE_R5_R6_IF_LAST
cmp r1, #1
popeq {r0, pc}

WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_LOW_BITS_ODD_EVEN_8BPP_WIDE r11 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_HIGH_BITS_ODD_EVEN_8BPP_WIDE r7 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_LOW_BITS_ODD_EVEN_8BPP_WIDE r12 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_HIGH_BITS_ODD_EVEN_8BPP_WIDE r10 // input in r8

WRITE_R5_R6_R7_R10

subs r1, r1, #2
bne loop_oe8bpp

pop {r0, pc}


preload_capture_line_default_odd_even_sixbits_8bpp:
SETUP_DUMMY_PARAMETERS
b capture_line_default_odd_even_sixbits_8bpp

.ltorg







// *** 16 bit ***
.align 6
b preload_capture_line_default_sixbits_16bpp
Expand Down
37 changes: 37 additions & 0 deletions src/capture_line_default_sixbits_double_8bpp_16bpp.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.text

.global capture_line_default_sixbits_double_8bpp
.global capture_line_default_odd_even_sixbits_double_8bpp
.global capture_line_default_sixbits_double_16bpp

// The capture line function is provided the following:
Expand Down Expand Up @@ -94,6 +95,42 @@ preload_capture_line_default_sixbits_double_8bpp:
b capture_line_default_sixbits_double_8bpp
.ltorg

// *** 8 bit ***
.align 6
b preload_capture_line_default_odd_even_sixbits_double_8bpp
capture_line_default_odd_even_sixbits_double_8bpp:
push {lr}
SETUP_VSYNC_DEBUG_R11_R12_DOUBLE
SKIP_PSYNC_NO_OLD_CPLD
mov r1, r1, lsr #1
loop_oe8bpp:
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_BITS_DOUBLE_ODD_EVEN_8BPP_WIDE r11 r5 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_BITS_DOUBLE_ODD_EVEN_8BPP_WIDE r12 r6 // input in r8

WRITE_R5_R6_IF_LAST
cmp r1, #1
popeq {r0, pc}

WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_BITS_DOUBLE_ODD_EVEN_8BPP_WIDE r11 r7 // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
CAPTURE_BITS_DOUBLE_ODD_EVEN_8BPP_WIDE r12 r10 // input in r8

WRITE_R5_R6_R7_R10

subs r1, r1, #2
bne loop_oe8bpp

pop {r0, pc}


preload_capture_line_default_odd_even_sixbits_double_8bpp:
SETUP_DUMMY_PARAMETERS
b capture_line_default_odd_even_sixbits_double_8bpp
.ltorg

// *** 16 bit ***
.align 6
b preload_capture_line_default_sixbits_double_16bpp
Expand Down
7 changes: 7 additions & 0 deletions src/cpld.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ typedef struct {
// for the two different CPLD implementations
typedef struct {
const char *name;
const char *nameBBC;
const char *nameRGB;
const char *nameYUV;
const char *nameprefix;
const char *nameBBCprefix;
const char *nameRGBprefix;
const char *nameYUVprefix;
const char *default_profile;
void (*init)(int cpld_version);
int (*get_version)();
Expand Down
9 changes: 8 additions & 1 deletion src/cpld_atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,14 @@ static void cpld_set_frontend(int value) {

cpld_t cpld_atom = {
.name = "Atom",
.default_profile = "Acorn_Atom",
.nameBBC = "Atom",
.nameRGB = "Atom",
.nameYUV = "Atom",
.nameprefix = "Atom",
.nameBBCprefix = "Atom",
.nameRGBprefix = "Atom",
.nameYUVprefix = "Atom",
.default_profile = "Acorn/Acorn_Atom",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand Down
45 changes: 40 additions & 5 deletions src/cpld_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ static void cpld_set_frontend(int value)

cpld_t cpld_null_atom = {
.name = "Atom",
.default_profile = "Atom",
.nameBBC = "Atom",
.nameRGB = "Atom",
.nameYUV = "Atom",
.nameprefix = "Atom",
.nameBBCprefix = "Atom",
.nameRGBprefix = "Atom",
.nameYUVprefix = "Atom",
.default_profile = "Acorn/Acorn_Atom",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -117,7 +124,14 @@ cpld_t cpld_null_atom = {

cpld_t cpld_null_3bit = {
.name = "3-12_BIT_BBC",
.default_profile = "BBC_Micro",
.nameBBC = "3-12_BIT_BBC",
.nameRGB = "3-12_BIT_BBC",
.nameYUV = "3-12_BIT_BBC",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -142,7 +156,14 @@ cpld_t cpld_null_3bit = {

cpld_t cpld_null_6bit = {
.name = "3-12_BIT_BBC",
.default_profile = "BBC_Micro",
.nameBBC = "3-12_BIT_BBC",
.nameRGB = "6-12_BIT_RGB",
.nameYUV = "6-12_BIT_YUV",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "RGB",
.nameYUVprefix = "YUV",
.default_profile = "Acorn/BBC_Micro",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -167,7 +188,14 @@ cpld_t cpld_null_6bit = {

cpld_t cpld_null_simple = {
.name = "Simple",
.default_profile = "Amiga",
.nameBBC = "Simple",
.nameRGB = "Simple",
.nameYUV = "Simple",
.nameprefix = "Simple",
.nameBBCprefix = "Simple",
.nameRGBprefix = "Simple",
.nameYUVprefix = "Simple",
.default_profile = "Commodore/Amiga",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -192,7 +220,14 @@ cpld_t cpld_null_simple = {

cpld_t cpld_null = {
.name = "3-12_BIT_BBC",
.default_profile = "BBC_Micro",
.nameBBC = "3-12_BIT_BBC",
.nameRGB = "3-12_BIT_BBC",
.nameYUV = "3-12_BIT_BBC",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand Down
81 changes: 72 additions & 9 deletions src/cpld_rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,14 @@ static int cpld_frontend_info_bbc() {

cpld_t cpld_bbc = {
.name = "3-12_BIT_BBC",
.default_profile = "BBC_Micro",
.nameBBC = "3-12_BIT_BBC",
.nameRGB = "3-12_BIT_BBC",
.nameYUV = "3-12_BIT_BBC",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro",
.init = cpld_init_bbc,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -2219,7 +2226,14 @@ cpld_t cpld_bbc = {

cpld_t cpld_bbcv10v20 = {
.name = "Legacy_3_BIT",
.default_profile = "BBC_Micro_v10-v20",
.nameBBC = "Legacy_3_BIT",
.nameRGB = "Legacy_3_BIT",
.nameYUV = "Legacy_3_BIT",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro_v10-v20",
.init = cpld_init_bbc,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -2244,7 +2258,14 @@ cpld_t cpld_bbcv10v20 = {

cpld_t cpld_bbcv21v23 = {
.name = "Legacy_3_BIT",
.default_profile = "BBC_Micro_v21-v23",
.nameBBC = "Legacy_3_BIT",
.nameRGB = "Legacy_3_BIT",
.nameYUV = "Legacy_3_BIT",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro_v21-v23",
.init = cpld_init_bbc,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -2269,7 +2290,14 @@ cpld_t cpld_bbcv21v23 = {

cpld_t cpld_bbcv24 = {
.name = "Legacy_3_BIT",
.default_profile = "BBC_Micro_v24",
.nameBBC = "Legacy_3_BIT",
.nameRGB = "Legacy_3_BIT",
.nameYUV = "Legacy_3_BIT",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro_v24",
.init = cpld_init_bbc,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -2294,7 +2322,14 @@ cpld_t cpld_bbcv24 = {

cpld_t cpld_bbcv30v62 = {
.name = "Legacy_3_BIT",
.default_profile = "BBC_Micro_v30-v62",
.nameBBC = "Legacy_3_BIT",
.nameRGB = "Legacy_3_BIT",
.nameYUV = "Legacy_3_BIT",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "BBC",
.nameYUVprefix = "BBC",
.default_profile = "Acorn/BBC_Micro_v30-v62",
.init = cpld_init_bbc,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand Down Expand Up @@ -2333,7 +2368,14 @@ static int cpld_frontend_info_rgb_ttl() {

cpld_t cpld_rgb_ttl = {
.name = "6-12_BIT_RGB",
.default_profile = "Acorn_Electron",
.nameBBC = "3-12_BIT_BBC",
.nameRGB = "6-12_BIT_RGB",
.nameYUV = "6-12_BIT_YUV",
.nameprefix = "RGB",
.nameBBCprefix = "BBC",
.nameRGBprefix = "RGB",
.nameYUVprefix = "YUV",
.default_profile = "Acorn/Electron",
.init = cpld_init_rgb_ttl,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -2358,7 +2400,14 @@ cpld_t cpld_rgb_ttl = {

cpld_t cpld_rgb_ttl_24mhz = {
.name = "3-12_BIT_BBC",
.default_profile = "BBC_Micro",
.nameBBC = "3-12_BIT_BBC",
.nameRGB = "6-12_BIT_RGB",
.nameYUV = "6-12_BIT_YUV",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "RGB",
.nameYUVprefix = "YUV",
.default_profile = "Acorn/BBC_Micro",
.init = cpld_init_rgb_ttl,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand Down Expand Up @@ -2407,7 +2456,14 @@ static void cpld_set_frontend_rgb_analog(int value) {

cpld_t cpld_rgb_analog = {
.name = "6-12_BIT_RGB_Analog",
.default_profile = "Amstrad_CPC",
.nameBBC = "3-12_BIT_BBC_Analog",
.nameRGB = "6-12_BIT_RGB_Analog",
.nameYUV = "6-12_BIT_YUV_Analog",
.nameprefix = "RGB",
.nameBBCprefix = "BBC",
.nameRGBprefix = "RGB",
.nameYUVprefix = "YUV",
.default_profile = "Amstrad/Amstrad_CPC",
.init = cpld_init_rgb_analog,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand All @@ -2433,7 +2489,14 @@ cpld_t cpld_rgb_analog = {

cpld_t cpld_rgb_analog_24mhz = {
.name = "3-12_BIT_BBC_Analog",
.default_profile = "BBC_Micro",
.nameBBC = "3-12_BIT_BBC_Analog",
.nameRGB = "6-12_BIT_RGB_Analog",
.nameYUV = "6-12_BIT_YUV_Analog",
.nameprefix = "BBC",
.nameBBCprefix = "BBC",
.nameRGBprefix = "RGB",
.nameYUVprefix = "YUV",
.default_profile = "Acorn/BBC_Micro",
.init = cpld_init_rgb_analog,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand Down
9 changes: 8 additions & 1 deletion src/cpld_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,14 @@ static void cpld_set_frontend(int value)

cpld_t cpld_simple = {
.name = "Simple",
.default_profile = "Amiga",
.nameBBC = "Simple",
.nameRGB = "Simple",
.nameYUV = "Simple",
.nameprefix = "Simple",
.nameBBCprefix = "Simple",
.nameRGBprefix = "Simple",
.nameYUVprefix = "Simple",
.default_profile = "Commodore/Amiga",
.init = cpld_init,
.get_version = cpld_get_version,
.calibrate = cpld_calibrate,
Expand Down
Loading