kopia lustrzana https://github.com/hoglet67/RGBtoHDMI
Fix menu corruption when changing overscan in mode 7. Also add border colour in setup modes
rodzic
f94e3e634f
commit
61e656a0ae
|
@ -383,6 +383,12 @@ void geometry_get_fb_params(capture_info_t *capinfo) {
|
|||
capinfo->sync_type = geometry->sync_type;
|
||||
capinfo->vsync_type = geometry->vsync_type;
|
||||
|
||||
if (geometry->setup_mode == SETUP_NORMAL) {
|
||||
capinfo->border = get_border();
|
||||
} else {
|
||||
capinfo->border = 0x12; // max green/Y
|
||||
}
|
||||
|
||||
uint32_t h_size = (*PIXELVALVE2_HORZB) & 0xFFFF;
|
||||
uint32_t v_size = (*PIXELVALVE2_VERTB) & 0xFFFF;
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ skip_swap:
|
|||
blne clear_screen
|
||||
|
||||
// Clear the following state bits:
|
||||
bic r3, r3, #(BIT_FIELD_TYPE | BIT_CLEAR)
|
||||
bic r3, r3, #(BIT_FIELD_TYPE)
|
||||
bic r3, r3, #(BIT_FIELD_TYPE1_VALID)
|
||||
|
||||
// In Mode 7 (or on probe) write to buffer 0, display buffer 0
|
||||
|
@ -636,16 +636,20 @@ noInBandData:
|
|||
|
||||
// Update the OSD in Mode 0..6
|
||||
|
||||
tst r3, #BIT_CLEAR
|
||||
bne force_osd_update
|
||||
tst r3, #BIT_MODE7
|
||||
bne skip_osd_update
|
||||
force_osd_update:
|
||||
push {r1-r5, r11}
|
||||
mov r0, r11 // start of current draw buffer
|
||||
mov r0, r11
|
||||
mov r1, r2 // bytes per line
|
||||
bl osd_update_fast
|
||||
pop {r1-r5, r11}
|
||||
tst r3, #BIT_OSD //Workaround to stop interlace change detection when OSD on in case it takes longer than frame
|
||||
bicne r3, #BIT_FIELD_TYPE1_VALID //to update and you get an erroneous interlace changed exit
|
||||
skip_osd_update:
|
||||
bic r3, r3, #BIT_CLEAR
|
||||
|
||||
#ifdef MULTI_BUFFER
|
||||
// Update the last drawn buffer
|
||||
|
@ -1212,21 +1216,10 @@ clear_screen:
|
|||
orreq r9, r9, lsl #4
|
||||
orr r9, r9, lsl #8
|
||||
orr r9, r9, lsl #16
|
||||
tst r3, #BIT_MODE7
|
||||
beq clearnot7
|
||||
ldr r8, =0x88888888
|
||||
clear_loop:
|
||||
ldr r7, [r11]
|
||||
subs r6, r6, #4
|
||||
and r7, r8
|
||||
orr r7, r9
|
||||
str r7, [r11], #4
|
||||
bne clear_loop
|
||||
pop {r4-r12, pc}
|
||||
clearnot7:
|
||||
clearloop:
|
||||
subs r6, r6, #4
|
||||
str r9, [r11], #4
|
||||
bne clearnot7
|
||||
bne clearloop
|
||||
pop {r4-r12, pc}
|
||||
|
||||
// ======================================================================
|
||||
|
|
|
@ -2000,7 +2000,7 @@ void rgb_to_hdmi_main() {
|
|||
int last_paletteControl = paletteControl;
|
||||
int mode_changed;
|
||||
int fb_size_changed;
|
||||
int active_size_decreased;
|
||||
int active_size_changed;
|
||||
int clk_changed = 0;
|
||||
int ncapture;
|
||||
int last_profile = -1;
|
||||
|
@ -2118,14 +2118,13 @@ void rgb_to_hdmi_main() {
|
|||
// log_info(" Regs:%08x %08x = %02x",PERIPHERAL_BASE, i, *i);
|
||||
// }
|
||||
|
||||
if (border !=0) {
|
||||
if (capinfo->border !=0) {
|
||||
clear = BIT_CLEAR;
|
||||
}
|
||||
do {
|
||||
|
||||
geometry_get_fb_params(capinfo);
|
||||
capinfo->ncapture = ncapture;
|
||||
capinfo->border = border;
|
||||
calculate_fb_adjustment();
|
||||
capinfo->palette_control = paletteControl;
|
||||
// Update capture info, in case sample width has changed
|
||||
|
@ -2202,7 +2201,7 @@ void rgb_to_hdmi_main() {
|
|||
geometry_get_fb_params(capinfo);
|
||||
|
||||
fb_size_changed = (capinfo->width != last_capinfo.width) || (capinfo->height != last_capinfo.height) || (capinfo->bpp != last_capinfo.bpp);
|
||||
active_size_decreased = (capinfo->chars_per_line < last_capinfo.chars_per_line) || (capinfo->nlines < last_capinfo.nlines);
|
||||
active_size_changed = (capinfo->chars_per_line != last_capinfo.chars_per_line) || (capinfo->nlines != last_capinfo.nlines);
|
||||
|
||||
geometry_get_clk_params(&clkinfo);
|
||||
clk_changed = (clkinfo.clock != last_clkinfo.clock) || (clkinfo.line_len != last_clkinfo.line_len || (clkinfo.clock_ppm != last_clkinfo.clock_ppm));
|
||||
|
@ -2210,11 +2209,11 @@ void rgb_to_hdmi_main() {
|
|||
last_mode7 = mode7;
|
||||
|
||||
mode7 = result & BIT_MODE7 & (autoswitch == AUTOSWITCH_MODE7);
|
||||
mode_changed = mode7 != last_mode7 || capinfo->vsync_type != last_capinfo.vsync_type || capinfo->sync_type != last_capinfo.sync_type
|
||||
mode_changed = mode7 != last_mode7 || capinfo->vsync_type != last_capinfo.vsync_type || capinfo->sync_type != last_capinfo.sync_type || capinfo->border != last_capinfo.border
|
||||
|| capinfo->px_sampling != last_capinfo.px_sampling || paletteControl != last_paletteControl
|
||||
|| profile != last_profile || last_subprofile != subprofile || (result & RET_SYNC_TIMING_CHANGED);
|
||||
|
||||
if (active_size_decreased) {
|
||||
if (active_size_changed) {
|
||||
clear = BIT_CLEAR;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue