Subject: [stella] no sync From: Adam Wozniak <adam@xxxxxxxxxxxxxxxx> Date: Mon, 16 May 2005 23:34:33 -0400 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alrighty, what am I doing wrong? -- values calculated fo 8 bit DAC from 3.3V source. type NTSCTYPE is array (0 to 7) of std_logic_vector(7 downto 0); constant ntsc_mid : NTSCTYPE := ( X"17", X"1E", X"25", X"2C", X"32", X"39", X"40", X"47"); constant ntsc_hi : NTSCTYPE := ( X"22", X"29", X"30", X"36", X"3D", X"44", X"4B", X"52"); constant ntsc_lo : NTSCTYPE := ( X"0C", X"13", X"1A", X"21", X"28", X"2E", X"35", X"3C"); constant ntsc_sync : std_logic_vector(7 downto 0) := X"00"; constant ntsc_black : std_logic_vector(7 downto 0) := X"17"; -- posNOW is an 8 bit counter which rolls over at 227 -- active video is from 68 to 227 -- color and lm are the color and luminance if the current pixel -- colors is an array of phase shifted color signals -- ntsc output values process (posNOW, color, lm, regVSYNC, colors, clk) begin if regVSYNC = '1' then if posNOW = X"00" then ntsc <= ntsc_black; elsif posNOW = X"0E" then ntsc <= ntsc_sync; end if; else if posNOW = X"00" then ntsc <= ntsc_sync; elsif posNOW = X"0E" then ntsc <= ntsc_black; elsif posNOW >= X"12" and posNOW <= X"1C" then if clk = '1' then ntsc <= ntsc_hi(0); else ntsc <= ntsc_lo(0); end if; elsif posNOW >= X"1D" and posNOW <= X"44" then ntsc <= ntsc_black; elsif posNOW >= X"45" then if color = "0000" then ntsc <= ntsc_mid(CONV_INTEGER(lm)); else if colors(CONV_INTEGER(color)) = '1' then ntsc <= ntsc_hi(CONV_INTEGER(lm)); else ntsc <= ntsc_lo(CONV_INTEGER(lm)); end if; end if; end if; end if; end process; - -- adam@xxxxxxxxxxxxxxxx http://cuddlepuddle.org/~adam KG6GZR http://cuddlepuddle.org/~adam/resume.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCiWW4yvXf5Z0z5zERAll1AJ93FhvXyemtCGycyYPJc1mfc/2hVACghRc6 fh7VEjioZGpRGdkXcEuZ9EU= =gkGo -----END PGP SIGNATURE----- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://stella.biglist.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] DASM disappeared?, Kirk Israel | Thread | [stella] The Worm Returns, Billy Eno |
Re: [stella] progress with PlayerPa, Adam Thornton | Date | [stella] The Worm Returns, Billy Eno |
Month |