anchor.diff:              (when (and (zerop i) opaque-p)
                 (set-sprite-zero-hit ppu 1))
               (let ((tile-color (logior (ash (palette sprite) 2) pattern-color)))
  -              (return (get-color ppu (+ #x3f00 tile-color))))))))
  -
  -;;;; Misc Helpers
  -
  -(defun get-visible-sprites (ppu)
  -  ; TODO: Did I mistranslate semantics here?
  -  (with-accessors ((oam ppu-oam)) ppu
  -    (loop with count = 0 with result = (make-array 8 :initial-element nil)
  -       for i from 0 to 64 for sprite = (get-sprite ppu i)
  -       when (on-scanline sprite ppu)
  -       do (if (< count 8)
  -              (setf (aref result count) i
  -                    count (1+ count))
  -              (set-sprite-overflow ppu 1))
  -       finally (return result))))
  -
  -(defun on-top (x y)
  -  (declare (ignore x)) ; TODO: determine sprite priority
  -  y)
  +              (return (list (get-color ppu (+ #x3f00 tile-color))
  +                            (priority sprite))))))))
   
   ;;;; Core
   
  
positive.code:            (bit-1 (logand (ash plane-1 (- (mod x 8) 7)) 1)))
        (logior (ash bit-1 1) bit-0))))
  
  ;;;; Rendering helpers
  
  (defun nametable-addr (x y)
  
negative.code:                            (get-bg-pixel ppu x)))
                 (sprite-color (when (show-sprites ppu)
                                 (get-sprite-pixel ppu x bg-color)))
                 (color (pick-color bg-color sprite-color bd-color)))
            ;(put-pixel x (ppu-scanline ppu) color)
            (sdl:with-pixel (pixels (sdl:fp *screen*))
              (sdl:write-pixel pixels x (ppu-scanline ppu) color)))))))
  