is there any real arduino emulators (so I can upload and run machine code on it)
There are many different processors used in making many different types of Arduino boards.  So there is no one way to write Arduino machine code. 

There are emulator for simpler processors available for the asking.  But, while they work, it is not believe they claim to be totally accurate. 

At one point in processor development history, ICE machines were widely used.  This is where a real processor is modified to allow access to internal controls and registers.  (This actually sounds like the answer to your question.)  However, as processors grew in speed and complexity, this approach grew out of favor.

Currently, most processors are built with extra internal circuitry and interface to break program execution for debugging purposes.  JTAG is one such industry standard / example.

So, while the question has merit, the common practice is likely not to run code on an emulator, but to run it on the processor using the JTAG interface and an IDE running on a host-computer / work-station.