~/talk

Emulating a 6502 System in JavaScript

Talkat GOTO Chicago 2016 · 2016-05-23..05-26· [javascript, creative-coding]
slides:none on file

A full cycle-accurate emulator of a BBC Micro runs in JavaScript, emulating the 6502 CPU, video chip, timers and interrupts well enough to load and play Elite and decode long-broken protected titles like Alien 8. Implementation uses per-cycle timing, cycle stretching, models undocumented opcodes (store AX), and leverages Visual 6502 die reverse-engineering to find read/write subcycles. Performance wins come from typed arrays, WebGL for output, avoiding huge switchTables, jump tables or binary search for opcodes and loop unrolling so the emulator actually runs.

AI-written summary · about

  1. 0:00Intro
  2. 1:21First made in 1975
  3. 3:18Other 6502 computers
  4. 4:23The BBC Micro
  5. 7:17Getting kids into programming
  6. 9:03Elite
  7. 9:52Exile
  8. 10:05Why JavaScript
  9. 11:01About the 6502
  10. 12:52Instructions
  11. 13:11LoadA
  12. 14:24XY
  13. 15:52How to start
  14. 16:08What it looks like
  15. 18:10Video Chip
  16. 20:34Array
  17. 26:12Fix
  18. 28:01Debugging
  19. 30:06Opcodes
  20. 30:43Visual 6502
  21. 33:12StoreAx
  22. 33:31Alienation
  23. 34:28Protection
  24. 38:18Example
  25. 40:28Fixing the code
  26. 41:04Cycle stretching
  27. 41:53Performance
  28. 43:36Conclusion
~/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.