# HG changeset patch # User Steve Losh # Date 1482775072 18000 # Node ID 103e7794c04a09ed4a8d5ef82230ce9c295f1ea4 # Parent d7f633984384abfedb9fb4a0dd82db5c60f4600e Fix headings diff -r d7f633984384 -r 103e7794c04a content/blog/2016/12/chip8-sound.markdown --- a/content/blog/2016/12/chip8-sound.markdown Mon Dec 26 12:39:38 2016 -0500 +++ b/content/blog/2016/12/chip8-sound.markdown Mon Dec 26 12:57:52 2016 -0500 @@ -48,7 +48,7 @@ Let's add the required registers and instructions to the emulator. -## Data +### Data First we'll add the registers into the `chip` struct: @@ -63,7 +63,7 @@ These are of type `fixnum` instead of `int8` for reasons we'll see later. -## Instructions +### Instructions The CHIP-8 has three `LD` instructions for dealing with these registers. We actually saw them back in the first post, but now we know their purpose: @@ -79,7 +79,7 @@ (setf ,destination ,source))) ``` -## Timers +### Timers Next we'll need to decrement the timers at a rate of 60hz. We could do some math to figure out the number of cycles between each and do this in the main