rem: buffer[7] = 0x28;
add: if (si->ps.tv_encoder.type >= CX25870) {   buffer[7] = 0x0c;  } else {  buffer[7] = 0x28;  }
context: static uint8 BT_init_NTSC720(){	uint8 stat;		uint8 buffer[35];	LOG(4,("Brooktree: Setting NTSC 720x480 overscanning DVD mode\n"));	buffer[0] = si->ps.tv_encoder.adress + WR;	//issue I2C write command	buffer[1] = 0x76;		//select first bt register to write to.	buffer[2] = 0xf0;		//lsb h_clk_o: overscan comp = 0, so h_clk_o = 2 * h_clk_i (VSR=2 = scaling=1)	buffer[3] = 0xd0;		//lsb h_active: h_active = 720 pixels wide port	buffer[4] = 0x83;	//scope: OK hsync_width: (hsync_width / h_clk_o) * 63.55556uS = 4.70uS for NTSC	buffer[5] = 0x98;	//scope: OK	hburst_begin: (hburst_begin / h_clk_o) * 63.55556uS = 5.3uS for NTSC	buffer[6] = 0x5e;	//scope: OK hburst_end: ((hburst_end + 128) / h_clk_o) * 63.55556uS = 7.94uS for NTSC	//How to find the correct values for h_blank_o and v_blank_o:	// 1. Calculate h_blank_o according to initial setting guideline mentioned below;	// 2. Set v_blank_o in the neighbourhood of $18, so that TV picture does not have ghosts on right side in it while	//    horizontal position is about OK;	// 3. Then tune h_blank_o for centered output on scope (look at front porch and back porch);	// 4. Now shift the TV output using Hsync_offset for centered output while looking at TV (in method 'SetBT_Hphase' above);	// 5. If no vertical shivering occurs when image is centered, you're done. Else:	// 6. Modify the RIVA (BeScreen) h_sync_start setting somewhat to get stable centered picture possible on TV AND!:	// 7. Make sure you update the Chrontel horizontal Phase setting also then!	buffer[7] = 0x28;	//scope: tuned. lsb h_blank_o: h_blank_o = horizontal viewport location on TV						//(guideline for initial setting: (h_blank_o / h_clk_0) * 63.55556uS = 9.5uS for NTSC)	buffer[8] = 0x18;	//try-out; scope: checked against other modes, looks OK.	v_blank_o: 1e active line ('pixel')	buffer[9] = 0xf2;		//v_active_o: = (active output lines + 2) / field (on TV)	buffer[10] = 0x26;		//lsn = msn h_clk_o;							//b4-5 = msbits h_active;							//b7 = b8 v_avtive_o.	buffer[11] = 0x00;		//h_fract is always 0.	buffer[12] = 0x78;		//lsb h_clk_i: h_clk_i is horizontal total = 888.	buffer[13] = 0x90; 	//try-out; lsb h_blank_i: #clks between start sync and new line 1st pixel; copy to VGA delta-sync!	buffer[14] = 0x03;		//b2-0 = msn h_clk_i;						//try-out: b3 = msn h_blank_i;							//b4 = vblankdly is always 0.	buffer[15] = 0x0d;		//lsb v_lines_i: v_lines_i = 525	buffer[16] = 0x1a; 	//try-out;	v_blank_i: #input lines between start sync and new line (pixel); copy to VGA delta-sync!						//Make sure though that this value for the BT is *even*, or image will shiver a *lot* horizontally on TV.	buffer[17] = 0xe0;		//lsb v_active_i: v_active_i = 480	buffer[18] = 0x36;		//b1-0 = msn v_lines_i;							//b3-2 = msn v_active_i;							//b5-4 = ylpf = 3;							//b7-6 = clpf = 0.			buffer[19] = 0x00;		//lsb v_scale: v_scale = off = $1000	buffer[20] = 0x50;		//b5-0 = msn v_scale;						//scope: tuned. b7-6 = msn h_blank_o.							//(((PLL_INT + (PLL_FRACT/65536)) / 6) * 13500000) = PIXEL_CLK = (hor.tot. * v_lines_i * 60Hz)	buffer[21] = 0x98;		//lsb PLL fract: PLL fract = 0x6e98	buffer[22] = 0x6e;		//msb PLL fract	buffer[23] = 0x8c;		//b5-0 = PLL int: PLL int = 0x0c;							//b6 = by_pll: by_pll = 0;							//b7 = EN_XCLK: chip-pin CLKI is pixel clock.	buffer[24] = 0x0a;		//b0 = ni_out is always 0;							//b1 = setup = 1 for NTSC;							//b2 = 625line = 0 for NTSC;							//b3 = vsync_dur = 1 for NTSC;							//b4 = dic_screset is always 0;							//b5 = pal_md = 0 for NTSC;							//b6 = eclip is always 0;							//b7 = reserved (en_scart) is always 0.	buffer[25] = 0xe5;		//sync_amp $e5 for NTSC	buffer[26] = 0x75;		//bst_amp $74-$76 for NTSC	buffer[27] = 0x78;		//mcr: r-y $77-$79 for NTSC	buffer[28] = 0x44;		//mcb: b-y $43-$44 for NTSC	buffer[29] = 0x85;		//my: y $85 for NTSC	buffer[30] = 0x3c;		//lsb msc: msc b31-0: NTSC formula: ((3579545 / pixelclk) * 2^32) = MSC	buffer[31] = 0x91;		//msc = $20c2913c	buffer[32] = 0xc2;	buffer[33] = 0x20;		//msb msc.	buffer[34] = 0x00;		//phase_off always $00	/* reset status */	i2c_flag_error (-1);	i2c_bstart(si->ps.tv_encoder.bus);	i2c_writebuffer(si->ps.tv_encoder.bus, buffer, sizeof(buffer));	i2c_bstop(si->ps.tv_encoder.bus);	/* log on errors */	stat = i2c_flag_error(0);	if (stat)		LOG(4,("Brooktree: I2C errors occurred while setting mode NTSC720\n"));	return stat;}//end BT_init_NTSC720.