rem: KISAGRPHW(BUF1PITCHL, (bes->ob_width & 0xff)); KISAGRPHW(BUF1PITCHH, ((bes->ob_width >> 8) & 0xff));
add: KISAGRPHW(BUF1PITCHL, (buf_pitch & 0xff)); KISAGRPHW(BUF1PITCHH, ((buf_pitch >> 8) & 0xff));
context: void drv_program_bes_ISA(nm_bes_data *bes){	uint8 temp;	/* ISA card */	/* unlock card overlay sequencer registers (b5 = 1) */	temp = (KISAGRPHR(GENLOCK) | 0x20);	/* we need to wait a bit or the card will mess-up it's register values.. (NM2160) */	snooze(10);	KISAGRPHW(GENLOCK, temp);	/* destination rectangle */	KISAGRPHW(HDCOORD1L, ((bes->hcoordv >> 16) & 0xff));	KISAGRPHW(HDCOORD2L, (bes->hcoordv & 0xff));	KISAGRPHW(HDCOORD21H, (((bes->hcoordv >> 4) & 0xf0) | ((bes->hcoordv >> 24) & 0x0f)));	KISAGRPHW(VDCOORD1L, ((bes->vcoordv >> 16) & 0xff));	KISAGRPHW(VDCOORD2L, (bes->vcoordv & 0xff));	KISAGRPHW(VDCOORD21H, (((bes->vcoordv >> 4) & 0xf0) | ((bes->vcoordv >> 24) & 0x0f)));	/* scaling */	KISAGRPHW(XSCALEL, (bes->hiscalv & 0xff));	KISAGRPHW(XSCALEH, ((bes->hiscalv >> 8) & 0xff));	KISAGRPHW(YSCALEL, (bes->viscalv & 0xff));	KISAGRPHW(YSCALEH, ((bes->viscalv >> 8) & 0xff));	/* inputbuffer #1 origin */	/* (we don't program buffer #2 as it's unused.) */	/* first include 'pixel precise' left clipping...	 * (subpixel precision is not supported by NeoMagic cards) */	bes->a1orgv += ((bes->hsrcstv >> 16) * 2);	/* we need to step in 4-byte (2 pixel) granularity due to the nature of yuy2 */	bes->a1orgv &= ~0x03;	/* now setup buffer startadress and horizontal source end (minimizes used bandwidth) */	if (bes->card_type < NM2200)	{		bes->a1orgv >>= 1;		/* horizontal source end does not use subpixelprecision: granularity is 8 pixels */		KISAGRPHW(0xbc, (((((bes->hsrcendv >> 16) + 7) & ~8) / 8) - 1));	}	else	{		/* horizontal source end does not use subpixelprecision: granularity is 16 pixels */		//fixme? divide by 16 instead of 8 (if >= NM2200 owners report trouble then use 8!)		//fixme? check if overlaybuffer width should also have granularity of 16 now!		KISAGRPHW(0xbc, (((((bes->hsrcendv >> 16) + 15) & ~16) / 16) - 1));	}	KISAGRPHW(BUF1ORGL, (bes->a1orgv & 0xff));	KISAGRPHW(BUF1ORGM, ((bes->a1orgv >> 8) & 0xff));	KISAGRPHW(BUF1ORGH, ((bes->a1orgv >> 16) & 0xff));	/* ??? */	KISAGRPHW(0xbd, 0x02);	KISAGRPHW(0xbe, 0x00);	/* b2 = 0: don't use horizontal mirroring (NM2160) */	/* other bits do ??? */	KISAGRPHW(0xbf, 0x02);	/* (subpixel precise) source rect clipping is not supported on NeoMagic cards;	 * so we do 'pixel precise' left clipping via modification of buffer	 * startadress above instead.	 * (pixel precise top clipping is also done this way..) */	//fixme: checkout real pixel precise clipping on NM2200 and later cards!!!/*	{		uint16 left = 0;		uint16 right = 128;		uint16 top = 0;		uint16 bottom = 128;		left = (bes->hsrcstv >> 16);		right = (bes->hsrclstv >> 16);		top = (bes->weight >> 16);		bottom = (bes->v1srclstv >> 16);		KISASEQW(HSCOORD1L, (left & 0xff));		KISASEQW(HSCOORD2L, (right & 0xff));		KISASEQW(HSCOORD21H, (((right >> 4) & 0xf0) | ((left >> 8) & 0x0f)));		KISASEQW(VSCOORD1L, (top & 0xff));		KISASEQW(VSCOORD2L, (bottom & 0xff));		KISASEQW(VSCOORD21H, (((bottom >> 4) & 0xf0) | ((top >> 8) & 0x0f)));	}*/	/* ??? */    KISASEQW(0x1c, 0xfb);   	KISASEQW(0x1d, 0x00);	KISASEQW(0x1e, 0xe2);   	KISASEQW(0x1f, 0x02);	/* b1 = 0: disable alternating hardware buffers (NM2160) */	/* other bits do ??? */	KISASEQW(0x09, 0x11);	/* ??? */	KISASEQW(0x0a, 0x00);	/* global BES control */	KISAGRPHW(BESCTRL1, (bes->globctlv & 0xff));	KISASEQW(BESCTRL2, ((bes->globctlv >> 8) & 0xff));	/**************************	 *** setup color keying ***	 **************************/	KISAGRPHW(COLKEY_R, bes->colkey_r);	KISAGRPHW(COLKEY_G, bes->colkey_g);	KISAGRPHW(COLKEY_B, bes->colkey_b);	/*************************	 *** setup misc. stuff ***	 *************************/	/* setup brightness to be 'neutral' (two's complement number) */	KISAGRPHW(BRIGHTNESS, 0x00);	/* setup inputbuffer #1 pitch including slopspace (in pixels) */	/* (we don't program the pitch for inputbuffer #2 as it's unused.) */	KISAGRPHW(BUF1PITCHL, (bes->ob_width & 0xff));	KISAGRPHW(BUF1PITCHH, ((bes->ob_width >> 8) & 0xff));}