diff --git a/src/defs.h b/src/defs.h index 41a0774b..7e88aca1 100644 --- a/src/defs.h +++ b/src/defs.h @@ -117,6 +117,7 @@ #define SCREEN_START 0x1E000000 // start of screen area #define SCREEN_SIZE 0x02000000 // size of screen area #define CACHED_SCREEN_OFFSET 0x01000000 // offset to cached screen area +#define WARN_12BIT // warn that 9bpp & 12bpp won't work #define HIDE_12BIT_PROFILES // 12 bit profile won't work on Pi zero2 etc //#define INHIBIT_DOUBLE_HEIGHT // inhibit line doubling as it causes memory stalls //#define USE_ALT_M7DEINTERLACE_CODE // uses re-ordered code for mode7 deinterlace @@ -129,6 +130,7 @@ #define SCREEN_START 0x1E000000 // start of screen area #define SCREEN_SIZE 0x02000000 // size of screen area #define CACHED_SCREEN_OFFSET 0x01000000 // offset to cached screen area +#define WARN_12BIT // warn that 9bpp & 12bpp won't work #define HIDE_12BIT_PROFILES // 12 bit profile won't work on Pi zero2 etc //#define INHIBIT_DOUBLE_HEIGHT // inhibit line doubling as it causes memory stalls //#define USE_ALT_M7DEINTERLACE_CODE // uses re-ordered code for mode7 deinterlace diff --git a/src/rgb_to_fb.S b/src/rgb_to_fb.S index e1348f25..c371d98b 100644 --- a/src/rgb_to_fb.S +++ b/src/rgb_to_fb.S @@ -2226,14 +2226,15 @@ wait_capture_count: beq wait_capture_count ldr r12, write_pointer core_capture: - ACTUAL_WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8 - str r12, write_pointer // write pointer is one sample behind - str r8, [r12], #4 - sub r11, r11, #1 - cmp r11, #0 - bgt core_capture - str r12, write_pointer // final write pointer - mov r11, #0 + ldr r8, [r4] + eor r0,r8, r3 // ***adjust register so r8 isn't corrupt + tst r0, #PSYNC_MASK + streq r12, write_pointer + eoreq r3, #PSYNC_MASK + streq r8, [r12], #4 + subeqs r11, r11, #1 + bne core_capture + str r12, write_pointer // final write pointer str r11, sync0_flag str r11, sync1_flag str r11, capture_count diff --git a/src/rgb_to_hdmi.c b/src/rgb_to_hdmi.c index 310baaf4..a926f5e9 100644 --- a/src/rgb_to_hdmi.c +++ b/src/rgb_to_hdmi.c @@ -3250,7 +3250,7 @@ void rgb_to_hdmi_main() { } osd_set(1, 0, osdline); } else { -#if defined(RPI2) || defined(RPI3) +#if defined(WARN_12BIT) if (capinfo->sample_width >= SAMPLE_WIDTH_9LO) { osd_set(1, 0, "9/12BPP UNSUPPORTED on Zero2W, use Zero/W"); } else { @@ -3298,7 +3298,7 @@ void rgb_to_hdmi_main() { ncapture = osd_key(OSD_SW3); } -#if defined(RPI2) || defined(RPI3) +#if defined(WARN_12BIT) if (powerup || ((capinfo->sample_width >= SAMPLE_WIDTH_9LO) && !osd_active())) { #else if (powerup) { @@ -3318,7 +3318,7 @@ void rgb_to_hdmi_main() { } osd_set(0, ATTR_DOUBLE_SIZE, osdline); osd_display_interface(2); -#if defined(RPI2) || defined(RPI3) +#if defined(WARN_12BIT) if(capinfo->sample_width >= SAMPLE_WIDTH_9LO) { osd_set(2 + 4, 0, "9BPP & 12BPP NOT SUPPORTED on Pi Zero 2W"); osd_set(2 + 5, 0, "Please use a Pi Zero or Pi Zero W");