First step

all possible changes to pass compilation, move to VC2012, include Altera
emulator libraries