new detect_ram function; tested on nc600, e-go, and didj