Init the base codes of frame