andymikulski / nES6

NES emulator written in ES6
Other
4 stars 1 forks source link

Headless Emulator #9

Closed andymikulski closed 7 years ago

andymikulski commented 7 years ago

Currently, the emulator writes directly to a WebGL/Canvas context. It would be interesting to create a mode where the emulator still ran as intended, but did not actually ever draw. Or, if it did draw, not to a DOM element.

The desired outcome is to have a "headless" emulator instance which could still track inputs/rom state/etc, but not render, and still produce accurate savestates.

Example use case:

  1. Computer A runs a headless instance, loads a rom, handles some inputs, and then exports save state - never being graphically rendered at all.
  2. Computer B loads the same rom, imports save state where Computer A had left off, and renders graphics to DOM accordingly.
andymikulski commented 7 years ago

Added in 3e32041b544cea91ce28dfb37333cd7b5bde5ab8 as config option { render: 'headless' }. Compared saves between canvas/webgl/headless versions, and they all spit out the same savestate.