In this video you can see how does the GameYob emulator work:
Thread of the emulator: http://gbatemp.net/threads/gameyob-a-gameboy-emulator-for-ds.343407/
Thread of the emulator: http://gbatemp.net/threads/gameyob-a-gameboy-emulator-for-ds.343407/