fengb / fundude

Gameboy emulator: Zig -> wasm
https://fengb.github.io/fundude/
MIT License
181 stars 8 forks source link

External draw buffer #64

Open fengb opened 3 years ago

fengb commented 3 years ago

Instead of leaving draw buffer(s) in the "core", Fundude should allow for passing in an external buffer. On vblank, the local display will be flushed into the buffer.

Rationale:

  1. Shrink the core memory usage
  2. The buffer flush can do the decode, which should be faster than JS (and a lot more readable than https://github.com/fengb/fundude/blob/master/web/Display.tsx#L87-L106)