[enigma.cpp] merge from atv