Can you run the algorithm on graphic resource first to produce vector graphics and then do the emulator stuff? Seems to me feasible and you can run two copies of the game (one with vector graphics one without in the background to ensure the correctness of emulator).