dz80/config.c
/*
	SetArea

	Set (or reset) the appropriate opMap bits
*/
SetArea
Set (or reset) the appropriate opMap bits
SetArea Set ( or reset ) the appropriate opMap bits
static int SetArea(lua_State *ls, BYTE type)
{
	DISZ80		*d;
	DWORD		start, end;
	BYTE		mask;
	d = GetD(ls);
	if (d->opMap != NULL)
		{
		d->parametersModified |= DPM_OPMAP;
		start = luaL_check_long(ls, 1);
		end = start + luaL_check_long(ls, 2) - 1;
		if (type)
			type = 0xff;
		while(start <= end && start < Z80MEMSIZE)
			{
			mask = 1 << (start & 7);
			d->opMap[start/8] &= ~mask;
			d->opMap[start/8] |= (mask & type);
			start++;
			}
		}
	return 0;
}
static int SetArea ( lua_State * ls , BYTE type ) { DISZ80 * d ; DWORD start , end ; BYTE mask ; d = GetD ( ls ) ; if ( d -> opMap != NULL ) { d -> parametersModified |= DPM_OPMAP ; start = luaL_check_long ( ls , 1 ) ; end = start + luaL_check_long ( ls , 2 ) - 1 ; if ( type ) type = 0xff ; while ( start <= end && start < Z80MEMSIZE ) { mask = 1 << ( start & 7 ) ; d -> opMap [ start / 8 ] &= ~ mask ; d -> opMap [ start / 8 ] |= ( mask & type ) ; start ++ ; } } return 0 ; }
SetArea
Set (or reset) the appropriate opMap bits
SetArea Set ( or reset ) the appropriate opMap bits