~/talk

Writing an emulator in JavaScript?

Talkat Nordic.js 2025 · 2025-10-02..10-03· [javascript, creative-coding]
slides:none on file

Builds a CHIP-8 emulator in JavaScript/TypeScript that actually runs an open‑source breakout ROM, using a 64x32 monochrome canvas for pixels and the Web Audio API beep for sound. Implements an 8‑bit CPU with 4096 memory locations and 16 registers, decodes 16‑bit opcodes with bitwise operators and hex (nibble) math, steps instructions at 60Hz, and uses a large switch to handle every opcode — it works, but imperfectly.

AI-written summary · about

  1. 0:00Introduction
  2. 1:30Emulation legality
  3. 3:40Hardware vs software emulation
  4. 5:03JavaScript challenges
  5. 6:09Core emulator components
  6. 7:32Screen emulation with canvas
  7. 11:26Sound with Web Audio API
  8. 13:158-bit CPU architecture
  9. 15:45ROM instructions and hex
  10. 19:18Decoding and executing instructions
  11. 21:51Bitwise operations
  12. 25:26Live demo
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.