emulator: Set inputs for core ID and core count.
hardware: Reduce number of registers that are reset and other minor optimizations.