changed sd_addr_max to 32768, added one to resX and resY