Add core library

change from nxogre