For example... TILE=BGGET(0,10,20,1) TILEID=TILE AND VAL("&B111111111111") ...will get you the BG tile ID for a BG tile on layer 0 and coordinates <10,20> in terms of screen pixels.