1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-01-20 01:34:38 +00:00

Popeye: separate sync for VGA, emit hsync at 15kHz (OSD needs it)

This commit is contained in:
Gyorgy Szombathelyi 2019-12-31 00:36:39 +01:00
parent b196233cfb
commit 533dc45802
2 changed files with 10 additions and 4 deletions

View File

@ -172,6 +172,11 @@ popeye popeye(
.cpu_rom_do(rom_addr[0] ? rom_do[15:8] : rom_do[7:0])
);
wire vs_out;
wire hs_out;
assign VGA_VS = scandoublerD | vs_out;
assign VGA_HS = scandoublerD ? cs : hs_out;
mist_video #(.COLOR_DEPTH(3), .SD_HCNT_WIDTH(10)) mist_video(
.clk_sys ( sys_clk ),
.SPI_SCK ( SPI_SCK ),
@ -185,13 +190,14 @@ mist_video #(.COLOR_DEPTH(3), .SD_HCNT_WIDTH(10)) mist_video(
.VGA_R ( VGA_R ),
.VGA_G ( VGA_G ),
.VGA_B ( VGA_B ),
.VGA_VS ( VGA_VS ),
.VGA_HS ( VGA_HS ),
.VGA_VS ( vs_out ),
.VGA_HS ( hs_out ),
.ce_divider ( 1'b1 ),
.blend ( status[5] ),
.rotate ( {1'b1, status[2]} ),
.scandoubler_disable(1),//scandoublerD ),
.scanlines ( "00"),//status[3:4] ),
.no_csync ( 1'b1 ),
.ypbpr ( ypbpr )
);

View File

@ -343,8 +343,8 @@ begin
if hcnt >= 2+16 and hcnt < 514+16-1 and
vcnt >= 16 and vcnt < 240 then video_blankn <= '1';end if;
if hs_cnt = 0 then hsync0 <= '0';
elsif hs_cnt = 47 then hsync0 <= '1';
if hs_cnt = 0 then hsync0 <= '0'; video_hs <= '0';
elsif hs_cnt = 47 then hsync0 <= '1'; video_hs <= '1';
end if;
if hs_cnt = 0 then hsync1 <= '0';