1
0
mirror of https://github.com/mist-devel/mist-board.git synced 2026-01-26 03:41:46 +00:00

Fix missing OSD on RGB 15khz. Fix dull colours on RGB 15khz

This commit is contained in:
Squid
2017-02-21 11:28:49 +00:00
parent 3067b3afe3
commit f034861757
2 changed files with 18 additions and 6 deletions

6
cores/bbc/fpga/mist/bbc_mist_top.v Normal file → Executable file
View File

@@ -109,7 +109,7 @@ clockgen CLOCKS(
// without scan doubler only half the pixel clock is used
reg clk_12m;
always @(clk_24m)
always @(posedge clk_24m)
clk_12m <= !clk_12m;
wire clk_osd = scandoubler_disable?clk_12m:clk_24m;
@@ -133,7 +133,9 @@ osd #(0,0,4) OSD (
.green_out ( VGA_G ),
.blue_out ( VGA_B ),
.hs_out ( v_hs ),
.vs_out ( v_vs )
.vs_out ( v_vs ),
.tv15khz ( scandoubler_disable )
);
wire v_hs, v_vs;

18
cores/bbc/fpga/mist/osd.v Normal file → Executable file
View File

@@ -45,7 +45,9 @@ module osd (
output [5:0] green_out,
output [5:0] blue_out,
output hs_out,
output vs_out
output vs_out,
input tv15khz
);
parameter OSD_X_OFFSET = 10'd0;
@@ -194,9 +196,17 @@ always @(posedge pclk)
osd_byte <= osd_buffer[{osd_vcnt[6:4], osd_hcnt}];
wire [2:0] osd_color = OSD_COLOR;
assign red_out = !osd_de? {3{red_in}} : {osd_pixel, osd_pixel, osd_color[2], {red_in, red_in[1]} };
assign green_out = !osd_de? {3{green_in}} : {osd_pixel, osd_pixel, osd_color[1], {green_in, green_in[1]} };
assign blue_out = !osd_de? {3{blue_in}} : {osd_pixel, osd_pixel, osd_color[0], {blue_in, blue_in[1]} };
// RGB 15khz output is different to fix dull colours, VGA not affected.
// BBC only uses one bit per colour but video engine uses a 2-bit vector, MSB is only used.
// BBC has a fixed palette of 8 colours.
wire [5:0] r_in = tv15khz? {5{red_in[0]}} : {3{red_in}};
wire [5:0] g_in = tv15khz? {5{green_in[0]}} : {3{green_in}};
wire [5:0] b_in = tv15khz? {5{blue_in[0]}} : {3{blue_in}};
assign red_out = !osd_de? r_in : {osd_pixel, osd_pixel, osd_color[2], {red_in, red_in[1]} };
assign green_out = !osd_de? g_in : {osd_pixel, osd_pixel, osd_color[1], {green_in, green_in[1]} };
assign blue_out = !osd_de? b_in : {osd_pixel, osd_pixel, osd_color[0], {blue_in, blue_in[1]} };
assign hs_out = hs_in;
assign vs_out = vs_in;