First try to port NEC_DECODE