--- a/content/blog/2016/12/chip8-sound.markdown Mon Dec 26 12:57:52 2016 -0500
+++ b/content/blog/2016/12/chip8-sound.markdown Mon Dec 26 14:15:14 2016 -0500
@@ -155,6 +155,18 @@
We could have used a lock from bordeaux threads to manage this portably (though
more slowly), but I wanted to play around with SBCL's concurrency stuff.
+Finally we just need to start up the timer thread:
+
+```lisp
+(defun run (rom-filename)
+ (let ((chip (make-chip)))
+ (setf *c* chip)
+ (load-rom chip rom-filename)
+ (bt:make-thread (curry #'run-cpu chip))
+ (bt:make-thread (curry #'run-timers chip)) ; NEW
+ (chip8.gui.screen::run-gui chip)))
+```
+
[SBCL manual]: http://www.sbcl.org/manual/#Atomic-Operations
## Sound From Scratch