copy some codes to this lib for adapter more roms