mirror of
https://github.com/marqs85/ossc
synced 2025-10-25 21:16:03 +03:00
integrate general improvements from Ossc Pro
* OSD timing optimizations and cursor color selection * flash robustness fixes
This commit is contained in:
parent
e09f3c88b0
commit
05a9e351d4
@ -36,8 +36,9 @@ typedef union {
|
||||
uint8_t y_offset:3;
|
||||
uint8_t x_size:2;
|
||||
uint8_t y_size:2;
|
||||
uint8_t border_color:2;
|
||||
uint32_t osd_rsv:15;
|
||||
uint8_t border_color:3;
|
||||
uint8_t highlight_color:3;
|
||||
uint32_t osd_rsv:11;
|
||||
} __attribute__((packed, __may_alias__));
|
||||
uint32_t data;
|
||||
} osd_config_reg;
|
||||
|
||||
@ -156,4 +156,4 @@ add_interface_port osd_if vclk vclk Input 1
|
||||
add_interface_port osd_if xpos xpos Input 11
|
||||
add_interface_port osd_if ypos ypos Input 11
|
||||
add_interface_port osd_if osd_enable osd_enable Output 1
|
||||
add_interface_port osd_if osd_color osd_color Output 2
|
||||
add_interface_port osd_if osd_color osd_color Output 3
|
||||
|
||||
@ -35,7 +35,7 @@ module osd_generator_top (
|
||||
input [10:0] xpos,
|
||||
input [10:0] ypos,
|
||||
output reg osd_enable,
|
||||
output reg [1:0] osd_color
|
||||
output reg [2:0] osd_color
|
||||
);
|
||||
|
||||
localparam CHAR_ROWS = 30;
|
||||
@ -43,10 +43,10 @@ localparam CHAR_COLS = 16;
|
||||
localparam CHAR_SECTIONS = 2;
|
||||
localparam CHAR_SEC_SEPARATOR = 2;
|
||||
|
||||
localparam BG_BLACK = 2'h0;
|
||||
localparam BG_BLUE = 2'h1;
|
||||
localparam BG_YELLOW = 2'h2;
|
||||
localparam BG_WHITE = 2'h3;
|
||||
localparam BG_BLACK = 3'h0;
|
||||
localparam BG_BLUE = 3'h1;
|
||||
localparam BG_YELLOW = 3'h6;
|
||||
localparam BG_WHITE = 3'h7;
|
||||
|
||||
localparam OSD_CONFIG_REGNUM = 8'hf0;
|
||||
localparam OSD_ROW_LSEC_ENABLE_REGNUM = 8'hf1;
|
||||
@ -59,7 +59,9 @@ reg [31:0] config_reg[OSD_ROW_LSEC_ENABLE_REGNUM:OSD_ROW_COLOR_REGNUM] /* synthe
|
||||
reg [10:0] xpos_osd_area_scaled, xpos_text_scaled;
|
||||
reg [10:0] ypos_osd_area_scaled, ypos_text_scaled;
|
||||
reg [7:0] x_ptr[2:5], y_ptr[2:5] /* synthesis ramstyle = "logic" */;
|
||||
reg osd_text_act_pp[2:6], osd_act_pp[3:6];
|
||||
reg osd_text_act_lsec_x_hit, osd_text_act_lsec_en, osd_text_act_rsec_x_hit, osd_text_act_rsec_en, osd_text_act_y_hit;
|
||||
reg osd_act_lsec_x_hit, osd_act_lsec_en, osd_act_rsec_x_hit, osd_act_rsec_en, osd_act_y_hit;
|
||||
reg osd_text_act_pp[3:6], osd_act_pp[4:6];
|
||||
reg [14:0] to_ctr, to_ctr_ms;
|
||||
reg char_px;
|
||||
|
||||
@ -71,7 +73,8 @@ wire [2:0] x_offset = osd_config[7:5];
|
||||
wire [2:0] y_offset = osd_config[10:8];
|
||||
wire [1:0] x_size = osd_config[12:11];
|
||||
wire [1:0] y_size = osd_config[14:13];
|
||||
wire [1:0] border_color = osd_config[16:15];
|
||||
wire [2:0] border_color = osd_config[17:15];
|
||||
wire [2:0] highlight_color = osd_config[20:18];
|
||||
|
||||
wire [10:0] xpos_scaled_w = (xpos >> x_size)-({3'h0, x_offset} << 3);
|
||||
wire [10:0] ypos_scaled_w = (ypos >> y_size)-({3'h0, y_offset} << 3);
|
||||
@ -123,21 +126,27 @@ always @(posedge vclk) begin
|
||||
y_ptr[pp_idx] <= y_ptr[pp_idx-1];
|
||||
end
|
||||
|
||||
osd_text_act_pp[2] <= render_enable &
|
||||
osd_text_act_lsec_x_hit <= (xpos_text_scaled < 8*CHAR_COLS);
|
||||
osd_text_act_lsec_en <= config_reg[OSD_ROW_LSEC_ENABLE_REGNUM][ypos_text_scaled/8];
|
||||
osd_text_act_rsec_x_hit <= (xpos_text_scaled >= 8*(CHAR_COLS+CHAR_SEC_SEPARATOR)) & (xpos_text_scaled < 8*(2*CHAR_COLS+CHAR_SEC_SEPARATOR));
|
||||
osd_text_act_rsec_en <= config_reg[OSD_ROW_RSEC_ENABLE_REGNUM][ypos_text_scaled/8];
|
||||
osd_text_act_y_hit <= (ypos_text_scaled < 8*CHAR_ROWS);
|
||||
osd_text_act_pp[3] <= render_enable &
|
||||
(menu_active || (to_ctr_ms > 0)) &
|
||||
(((xpos_text_scaled < 8*CHAR_COLS) & config_reg[OSD_ROW_LSEC_ENABLE_REGNUM][ypos_text_scaled/8]) |
|
||||
((xpos_text_scaled >= 8*(CHAR_COLS+CHAR_SEC_SEPARATOR)) & (xpos_text_scaled < 8*(2*CHAR_COLS+CHAR_SEC_SEPARATOR)) & config_reg[OSD_ROW_RSEC_ENABLE_REGNUM][ypos_text_scaled/8])) &
|
||||
(ypos_text_scaled < 8*CHAR_ROWS);
|
||||
for(pp_idx = 3; pp_idx <= 6; pp_idx = pp_idx+1) begin
|
||||
((osd_text_act_lsec_x_hit & osd_text_act_lsec_en) | (osd_text_act_rsec_x_hit & osd_text_act_rsec_en)) & osd_text_act_y_hit;
|
||||
for(pp_idx = 4; pp_idx <= 6; pp_idx = pp_idx+1) begin
|
||||
osd_text_act_pp[pp_idx] <= osd_text_act_pp[pp_idx-1];
|
||||
end
|
||||
|
||||
osd_act_pp[3] <= render_enable &
|
||||
osd_act_lsec_x_hit <= (xpos_osd_area_scaled/8 < (CHAR_COLS+1));
|
||||
osd_act_lsec_en <= config_reg[OSD_ROW_LSEC_ENABLE_REGNUM][(ypos_osd_area_scaled/8) ? ((ypos_osd_area_scaled/8)-1) : 0];
|
||||
osd_act_rsec_x_hit <= (xpos_osd_area_scaled/8 >= (CHAR_COLS+1)) & (xpos_osd_area_scaled/8 < (2*CHAR_COLS+CHAR_SEC_SEPARATOR+1));
|
||||
osd_act_rsec_en <= (config_reg[OSD_ROW_RSEC_ENABLE_REGNUM][(ypos_osd_area_scaled/8)-1] | config_reg[OSD_ROW_RSEC_ENABLE_REGNUM][ypos_osd_area_scaled/8]);
|
||||
osd_act_y_hit <= (ypos_osd_area_scaled < 8*(CHAR_ROWS+1));
|
||||
osd_act_pp[4] <= render_enable &
|
||||
(menu_active || (to_ctr_ms > 0)) &
|
||||
(((xpos_osd_area_scaled/8 < (CHAR_COLS+1)) & config_reg[OSD_ROW_LSEC_ENABLE_REGNUM][(ypos_osd_area_scaled/8) ? ((ypos_osd_area_scaled/8)-1) : 0]) |
|
||||
((xpos_osd_area_scaled/8 >= (CHAR_COLS+1)) & (xpos_osd_area_scaled/8 < (2*CHAR_COLS+CHAR_SEC_SEPARATOR+1)) & (config_reg[OSD_ROW_RSEC_ENABLE_REGNUM][(ypos_osd_area_scaled/8)-1] | config_reg[OSD_ROW_RSEC_ENABLE_REGNUM][ypos_osd_area_scaled/8]))) &
|
||||
(ypos_osd_area_scaled < 8*(CHAR_ROWS+1));
|
||||
for(pp_idx = 4; pp_idx <= 6; pp_idx = pp_idx+1) begin
|
||||
((osd_act_lsec_x_hit & osd_act_lsec_en) | (osd_act_rsec_x_hit & osd_act_rsec_en)) & osd_act_y_hit;
|
||||
for(pp_idx = 5; pp_idx <= 6; pp_idx = pp_idx+1) begin
|
||||
osd_act_pp[pp_idx] <= osd_act_pp[pp_idx-1];
|
||||
end
|
||||
|
||||
@ -147,7 +156,7 @@ always @(posedge vclk) begin
|
||||
|
||||
if (osd_text_act_pp[6]) begin
|
||||
if (char_px) begin
|
||||
osd_color <= config_reg[OSD_ROW_COLOR_REGNUM][char_row] ? BG_YELLOW : BG_WHITE;
|
||||
osd_color <= config_reg[OSD_ROW_COLOR_REGNUM][char_row] ? highlight_color : BG_WHITE;
|
||||
end else begin
|
||||
osd_color <= BG_BLUE;
|
||||
end
|
||||
|
||||
9
ossc.sdc
9
ossc.sdc
@ -2,10 +2,12 @@
|
||||
|
||||
create_clock -period 27MHz -name clk27 [get_ports clk27]
|
||||
|
||||
set_input_delay -clock clk27 0 [get_ports {sda scl SD_CMD SD_DAT* *ALTERA_DATA0}]
|
||||
set_input_delay -clock clk27 0 [get_ports {sda scl SD_CMD SD_DAT*}]
|
||||
set_false_path -from [get_ports {btn* cfg* ir_rx HDMI_TX_INT_N LED_R}]
|
||||
set_false_path -to {sys:sys_inst|sys_pio_1:pio_1|readdata*}
|
||||
|
||||
create_generated_clock -name flash_clk -divide_by 2 -source clk27 [get_pins sys:sys_inst|sys_intel_generic_serial_flash_interface_top_0:intel_generic_serial_flash_interface_top_0|sys_intel_generic_serial_flash_interface_top_0_qspi_inf_inst:qspi_inf_inst|flash_clk_reg|q]
|
||||
create_generated_clock -name flash_clk_out -master_clock flash_clk -source [get_pins sys:sys_inst|sys_intel_generic_serial_flash_interface_top_0:intel_generic_serial_flash_interface_top_0|sys_intel_generic_serial_flash_interface_top_0_qspi_inf_inst:qspi_inf_inst|flash_clk_reg|q] -multiply_by 1 [get_ports *ALTERA_DCLK]
|
||||
|
||||
### Scanconverter clock constraints ###
|
||||
|
||||
@ -55,6 +57,11 @@ set_false_path -to [remove_from_collection [all_outputs] $critoutputs_hdmi]
|
||||
# Lumacode (constrained to max. 60MHz sampling)
|
||||
set_max_delay 16.6 -from [get_registers sys:sys_inst|sc_config_top:sc_config_0|altsyncram:lumacode_pal_ram|*]
|
||||
|
||||
# Flash controller (delays from N25Q128A datasheet)
|
||||
set_input_delay -clock flash_clk_out -clock_fall 5 [get_ports *ALTERA_DATA0]
|
||||
set_output_delay -clock flash_clk_out 4 [get_ports *ALTERA_SCE]
|
||||
set_output_delay -clock flash_clk_out 2 [get_ports *ALTERA_SDO]
|
||||
|
||||
|
||||
### CPU/scanconverter clock relations ###
|
||||
|
||||
|
||||
16
rtl/ossc.v
16
rtl/ossc.v
@ -137,7 +137,7 @@ reg remote_event_prev;
|
||||
reg [14:0] to_ctr, to_ctr_ms;
|
||||
wire lcd_bl_timeout;
|
||||
|
||||
wire [1:0] osd_color;
|
||||
wire [2:0] osd_color;
|
||||
wire osd_enable_pre;
|
||||
wire osd_enable = osd_enable_pre & ~lt_active;
|
||||
wire [10:0] xpos_sc;
|
||||
@ -325,15 +325,7 @@ end
|
||||
// Output registers
|
||||
always @(posedge pclk_out) begin
|
||||
if (osd_enable) begin
|
||||
if (osd_color == 2'h0) begin
|
||||
{HDMI_TX_RD, HDMI_TX_GD, HDMI_TX_BD} <= 24'h000000;
|
||||
end else if (osd_color == 2'h1) begin
|
||||
{HDMI_TX_RD, HDMI_TX_GD, HDMI_TX_BD} <= 24'h0000ff;
|
||||
end else if (osd_color == 2'h2) begin
|
||||
{HDMI_TX_RD, HDMI_TX_GD, HDMI_TX_BD} <= 24'hffff00;
|
||||
end else begin
|
||||
{HDMI_TX_RD, HDMI_TX_GD, HDMI_TX_BD} <= 24'hffffff;
|
||||
end
|
||||
{HDMI_TX_RD, HDMI_TX_GD, HDMI_TX_BD} <= {{8{osd_color[2]}}, {8{osd_color[1]}}, {8{osd_color[0]}}};
|
||||
end else begin
|
||||
{HDMI_TX_RD, HDMI_TX_GD, HDMI_TX_BD} <= {R_sc, G_sc, B_sc};
|
||||
end
|
||||
@ -432,9 +424,9 @@ sys sys_inst(
|
||||
.pll_reconfig_0_pll_reconfig_if_scandone (pll_scandone)
|
||||
);
|
||||
|
||||
// These do not work in current Quartus version (23.1) and a patch file (scripts/qsys.patch) must be used after Qsys generation instead
|
||||
// These do not work in current Quartus version (24.1) and a patch file (scripts/qsys.patch) must be used after Qsys generation instead
|
||||
defparam
|
||||
sys_inst.master_0.fifo.USE_MEMORY_BLOCKS = 0;
|
||||
sys_inst.master_0.fifo.FIFO_DEPTH = 1024;
|
||||
|
||||
scanconverter #(
|
||||
.EMIF_ENABLE(0),
|
||||
|
||||
13
scripts/qsys.patch
Normal file
13
scripts/qsys.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- sys/synthesis/submodules/sys_master_0.v 2025-07-25 10:15:46.708247405 +0300
|
||||
+++ sys/synthesis/submodules/sys_master_0.v 2025-07-25 10:15:54.937804924 +0300
|
||||
@@ -156,9 +156,9 @@
|
||||
|
||||
altera_avalon_sc_fifo #(
|
||||
.SYMBOLS_PER_BEAT (1),
|
||||
.BITS_PER_SYMBOL (8),
|
||||
- .FIFO_DEPTH (64),
|
||||
+ .FIFO_DEPTH (1024),
|
||||
.CHANNEL_WIDTH (0),
|
||||
.ERROR_WIDTH (0),
|
||||
.USE_PACKETS (0),
|
||||
.USE_FILL_LEVEL (0),
|
||||
@ -64,21 +64,24 @@ for {set i 0} {$i<$num_sectors} {incr i} {
|
||||
}
|
||||
|
||||
puts "Writing flash"
|
||||
# writes garbage and occasionally hangs (bug in generic serial flash IF?)
|
||||
# JTAG to Avalon master does not support sink backpressure
|
||||
#master_write_from_file $claim_path mem_init/flash.bin $flash_imem_base
|
||||
|
||||
# work around the issue by writing into small chunks so that FIFO does not fill up
|
||||
# work around lack of backpressure support by writing chunks of master FIFO size
|
||||
set chunks [llength [glob mem_init/chunks/*]]
|
||||
puts "Programming $chunks chunks"
|
||||
set addr $flash_imem_base
|
||||
for {set i 0} {$i<$chunks} {incr i} {
|
||||
set file [format "flash.%04d" $i]
|
||||
master_write_from_file $claim_path mem_init/chunks/$file $addr
|
||||
set addr [expr $addr + 64]
|
||||
set addr [expr $addr + 1024]
|
||||
}
|
||||
#master_read_to_file $claim_path mem_init/flash_readback.bin $flash_imem_base $bin_size
|
||||
#master_read_to_file $claim_path mem_init/ram_readback.bin 0x010000 65536
|
||||
|
||||
# flush flashctrl cmd fifo to ensure writes have finished
|
||||
master_read_32 $claim_path $flash_base 1
|
||||
|
||||
puts "Resetting system"
|
||||
master_write_32 $claim_path 0x40 0x00000003
|
||||
after 1
|
||||
@ -86,4 +89,4 @@ master_write_32 $claim_path 0x40 0x00000001
|
||||
master_write_32 $claim_path 0x40 0x00000000
|
||||
|
||||
close_service master $claim_path
|
||||
puts "Done"
|
||||
puts "Done"
|
||||
|
||||
@ -208,7 +208,7 @@ APP_CFLAGS_UNDEFINED_SYMBOLS :=
|
||||
APP_CFLAGS_OPTIMIZATION := -Os
|
||||
APP_CFLAGS_DEBUG_LEVEL :=
|
||||
APP_CFLAGS_WARNINGS := -Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-function -Wno-packed-bitfield-compat
|
||||
APP_CFLAGS_USER_FLAGS := -fdata-sections -ffunction-sections -fshort-enums -fgnu89-inline -flto
|
||||
APP_CFLAGS_USER_FLAGS := -fdata-sections -ffunction-sections -fshort-enums -fgnu89-inline -flto -msmall-data-limit=0
|
||||
|
||||
APP_ASFLAGS_USER :=
|
||||
APP_LDFLAGS_USER := -Wl,--gc-sections
|
||||
@ -1154,7 +1154,7 @@ mem_init/flash.hex: sys_controller.elf
|
||||
$(RV_OBJCOPY) --change-addresses -0x02080000 -O ihex --gap-fill 0 $< mem_init/flash.hex
|
||||
mkdir -p mem_init/chunks
|
||||
rm -f mem_init/chunks/*
|
||||
split -d -b 64 -a 4 mem_init/flash.bin mem_init/chunks/flash.
|
||||
split -d -b 1024 -a 4 mem_init/flash.bin mem_init/chunks/flash.
|
||||
|
||||
.PHONY: mem_init_generate_new
|
||||
mem_init_generate_new: mem_init/flash.hex
|
||||
|
||||
@ -75,7 +75,7 @@ alt_u8 target_type;
|
||||
alt_u8 update_cur_vm;
|
||||
|
||||
alt_u8 profile_sel, profile_sel_menu, input_profiles[AV_LAST], lt_sel, def_input, profile_link, lcd_bl_timeout;
|
||||
alt_u8 osd_enable=1, osd_status_timeout=1;
|
||||
alt_u8 osd_enable=1, osd_status_timeout=1, osd_highlight_color=4;
|
||||
alt_u8 auto_input, auto_av1_ypbpr, auto_av2_ypbpr = 1, auto_av3_ypbpr;
|
||||
|
||||
char row1[LCD_ROW_LEN+1], row2[LCD_ROW_LEN+1], menu_row1[LCD_ROW_LEN+1], menu_row2[LCD_ROW_LEN+1];
|
||||
@ -1222,9 +1222,10 @@ int main()
|
||||
printf("Changing AV3 RGB source\n");
|
||||
cm.cc.av3_alt_rgb = tc.av3_alt_rgb;
|
||||
}
|
||||
if ((!!osd_enable != osd->osd_config.enable) || (osd_status_timeout != osd->osd_config.status_timeout)) {
|
||||
if ((!!osd_enable != osd->osd_config.enable) || (osd_status_timeout != osd->osd_config.status_timeout) || (osd_highlight_color != osd->osd_config.highlight_color)) {
|
||||
osd->osd_config.enable = !!osd_enable;
|
||||
osd->osd_config.status_timeout = osd_status_timeout;
|
||||
osd->osd_config.highlight_color = 2+osd_highlight_color;
|
||||
if (menu_active) {
|
||||
remote_code = 0;
|
||||
render_osd_page();
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#define PROFILE_VER_MINOR 12
|
||||
|
||||
#define INITCFG_VER_MAJOR 1
|
||||
#define INITCFG_VER_MINOR 0
|
||||
#define INITCFG_VER_MINOR 20
|
||||
|
||||
#ifdef OSDLANG_JP
|
||||
#define FW_SUFFIX "j"
|
||||
|
||||
@ -70,6 +70,7 @@ typedef struct {
|
||||
alt_u8 auto_av3_ypbpr;
|
||||
alt_u8 osd_enable;
|
||||
alt_u8 osd_status_timeout;
|
||||
alt_u8 osd_highlight_color;
|
||||
alt_u8 phase_hotkey_enable;
|
||||
alt_u16 keys[REMOTE_MAX_KEYS];
|
||||
} __attribute__((packed, __may_alias__)) ude_initcfg;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (C) 2015-2016 Markus Hiienkari <mhiienka@niksula.hut.fi>
|
||||
// Copyright (C) 2015-2025 Markus Hiienkari <mhiienka@niksula.hut.fi>
|
||||
//
|
||||
// This file is part of Open Source Scan Converter project.
|
||||
//
|
||||
@ -20,7 +20,16 @@
|
||||
#include <unistd.h>
|
||||
#include "flash.h"
|
||||
|
||||
#define DEMUX_FINISH_DELAY 10000
|
||||
|
||||
void __attribute__((noinline, flatten, __section__(".text_bram"))) flash_write_protect(flash_ctrl_dev *dev, int enable) {
|
||||
int i;
|
||||
|
||||
// add short delay to avoid mem/csr demux conflict (freeze) in intel_generic_serial_flash_interface
|
||||
for(i = 0; i < DEMUX_FINISH_DELAY; i++){
|
||||
asm volatile ("nop");
|
||||
}
|
||||
|
||||
// Write enable
|
||||
dev->regs->flash_cmd_cfg = 0x00000006;
|
||||
dev->regs->flash_cmd_ctrl = 1;
|
||||
@ -41,9 +50,21 @@ void __attribute__((noinline, flatten, __section__(".text_bram"))) flash_write_p
|
||||
// Write disable
|
||||
dev->regs->flash_cmd_cfg = 0x00000004;
|
||||
dev->regs->flash_cmd_ctrl = 1;
|
||||
|
||||
// add short delay to avoid mem/csr demux conflict (freeze) in intel_generic_serial_flash_interface
|
||||
for(i = 0; i < DEMUX_FINISH_DELAY; i++){
|
||||
asm volatile ("nop");
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((noinline, flatten, __section__(".text_bram"))) flash_sector_erase(flash_ctrl_dev *dev, uint32_t addr) {
|
||||
int i;
|
||||
|
||||
// add short delay to avoid mem/csr demux conflict (freeze) in intel_generic_serial_flash_interface
|
||||
for(i = 0; i < DEMUX_FINISH_DELAY; i++){
|
||||
asm volatile ("nop");
|
||||
}
|
||||
|
||||
// Write enable
|
||||
dev->regs->flash_cmd_cfg = 0x00000006;
|
||||
dev->regs->flash_cmd_ctrl = 1;
|
||||
@ -60,4 +81,9 @@ void __attribute__((noinline, flatten, __section__(".text_bram"))) flash_sector_
|
||||
if (!(dev->regs->flash_cmd_rddata[0] & (1<<0)))
|
||||
break;
|
||||
}
|
||||
|
||||
// add short delay to avoid mem/csr demux conflict (freeze) in intel_generic_serial_flash_interface
|
||||
for(i = 0; i < DEMUX_FINISH_DELAY; i++){
|
||||
asm volatile ("nop");
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ extern alt_u16 rc_keymap[REMOTE_MAX_KEYS];
|
||||
extern alt_u8 vm_sel, profile_sel_menu, lt_sel, def_input, profile_link, lcd_bl_timeout;
|
||||
extern alt_u8 auto_input, auto_av1_ypbpr, auto_av2_ypbpr, auto_av3_ypbpr;
|
||||
extern alt_u8 update_cur_vm;
|
||||
extern alt_u8 osd_enable, osd_status_timeout, phase_hotkey_enable;
|
||||
extern alt_u8 osd_enable, osd_status_timeout, osd_highlight_color, phase_hotkey_enable;
|
||||
extern uint8_t sl_def_iv_x, sl_def_iv_y;
|
||||
extern char target_profile_name[PROFILE_NAME_LEN+1];
|
||||
extern volatile osd_regs *osd;
|
||||
@ -77,6 +77,7 @@ static const char* const lt_desc[] = { "Top-left", "Center", "Bottom-right" };
|
||||
static const char* const lcd_bl_timeout_desc[] = { "Off", "3s", "10s", "30s" };
|
||||
static const char* const osd_enable_desc[] = { "Off", "Full", "Simple" };
|
||||
static const char* const osd_status_desc[] = { "2s", "5s", "10s", "Off" };
|
||||
static const char* const osd_color_desc[] = { "Green", "Cyan", "Red", "Magenta", "Yellow" };
|
||||
static const char* const rgsb_ypbpr_desc[] = { "RGsB", "YPbPr" };
|
||||
static const char* const auto_input_desc[] = { "Off", "Current input", "All inputs" };
|
||||
static const char* const mask_color_desc[] = { "Black", "Blue", "Green", "Cyan", "Red", "Magenta", "Yellow", "White" };
|
||||
@ -250,6 +251,7 @@ MENU(menu_settings, P99_PROTECT({ \
|
||||
{ "LCD BL timeout", OPT_AVCONFIG_SELECTION, { .sel = { &lcd_bl_timeout, OPT_WRAP, SETTING_ITEM(lcd_bl_timeout_desc) } } },
|
||||
{ "OSD", OPT_AVCONFIG_SELECTION, { .sel = { &osd_enable, OPT_WRAP, SETTING_ITEM(osd_enable_desc) } } },
|
||||
{ "OSD status disp.", OPT_AVCONFIG_SELECTION, { .sel = { &osd_status_timeout, OPT_WRAP, SETTING_ITEM(osd_status_desc) } } },
|
||||
{ "OSD cursor color", OPT_AVCONFIG_SELECTION, { .sel = { &osd_highlight_color, OPT_WRAP, SETTING_ITEM(osd_color_desc) } } },
|
||||
{ "Phase hotkey", OPT_AVCONFIG_SELECTION, { .sel = { &phase_hotkey_enable, OPT_WRAP, SETTING_ITEM(off_on_desc) } } },
|
||||
{ LNG("<Load profile >","<プロファイルロード >"), OPT_FUNC_CALL, { .fun = { load_profile, &profile_arg_info } } },
|
||||
{ LNG("<Save profile >","<プロファイルセーブ >"), OPT_FUNC_CALL, { .fun = { save_profile, &profile_arg_info } } },
|
||||
|
||||
@ -50,7 +50,7 @@ extern alt_u8 profile_sel;
|
||||
extern alt_u8 def_input, profile_link;
|
||||
extern alt_u8 lcd_bl_timeout;
|
||||
extern alt_u8 auto_input, auto_av1_ypbpr, auto_av2_ypbpr, auto_av3_ypbpr;
|
||||
extern alt_u8 osd_enable, osd_status_timeout, phase_hotkey_enable;
|
||||
extern alt_u8 osd_enable, osd_status_timeout, osd_highlight_color, phase_hotkey_enable;
|
||||
extern SD_DEV sdcard_dev;
|
||||
extern char menu_row1[LCD_ROW_LEN+1], menu_row2[LCD_ROW_LEN+1];
|
||||
|
||||
@ -89,6 +89,7 @@ int write_userdata(alt_u8 entry)
|
||||
((ude_initcfg*)databuf)->auto_av3_ypbpr = auto_av3_ypbpr;
|
||||
((ude_initcfg*)databuf)->osd_enable = osd_enable;
|
||||
((ude_initcfg*)databuf)->osd_status_timeout = osd_status_timeout;
|
||||
((ude_initcfg*)databuf)->osd_highlight_color = osd_highlight_color;
|
||||
((ude_initcfg*)databuf)->phase_hotkey_enable = phase_hotkey_enable;
|
||||
memcpy(((ude_initcfg*)databuf)->keys, rc_keymap, sizeof(rc_keymap));
|
||||
for (i=0; i<sizeof(ude_initcfg); i++)
|
||||
@ -201,6 +202,7 @@ int read_userdata(alt_u8 entry, int dry_run)
|
||||
auto_av3_ypbpr = ((ude_initcfg*)databuf)->auto_av3_ypbpr;
|
||||
osd_enable = ((ude_initcfg*)databuf)->osd_enable;
|
||||
osd_status_timeout = ((ude_initcfg*)databuf)->osd_status_timeout;
|
||||
osd_highlight_color = ((ude_initcfg*)databuf)->osd_highlight_color;
|
||||
profile_link = ((ude_initcfg*)databuf)->profile_link;
|
||||
profile_sel = input_profiles[AV_TESTPAT]; // Global profile
|
||||
lcd_bl_timeout = ((ude_initcfg*)databuf)->lcd_bl_timeout;
|
||||
|
||||
@ -136,7 +136,10 @@ BSP_CFLAGS_OPTIMIZATION = -Os
|
||||
|
||||
# C/C++ compiler warning level. "-Wall" is commonly used.This setting defines
|
||||
# the value of BSP_CFLAGS_WARNINGS in Makefile.
|
||||
BSP_CFLAGS_WARNINGS = -Wall
|
||||
BSP_CFLAGS_WARNINGS = -Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-function
|
||||
|
||||
# Match APP flags
|
||||
BSP_CFLAGS_USER_FLAGS := -fdata-sections -ffunction-sections -fshort-enums -fgnu89-inline -flto -msmall-data-limit=0
|
||||
|
||||
# C compiler command.
|
||||
CC = riscv64-unknown-elf-gcc -xc
|
||||
|
||||
15640
sys.sopcinfo
15640
sys.sopcinfo
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user