anchor.diff:            (aref *frame* (+ base 1)) (color-g color)
             (aref *frame* (+ base 2)) (color-b color))))
   
  -(defmethod get-pixel-color ((ppu ppu) kind tile x y)
  +(defmethod get-pattern-color ((ppu ppu) kind tile x y)
     (let ((offset (+ y (ash tile 4))))
       (case kind
         (:bg (incf offset (bg-pattern-addr ppu)))
  
positive.code:                  :attribute  (read-oam ppu (+ 2 base))
                   :x          (read-oam ppu (+ 3 base)))))
  
  (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 buffered-read (ppu)
    (let* ((addr (ppu-addr ppu))
           (result (read-vram ppu addr)))
      (incf (ppu-addr ppu) (vram-step ppu))
      (if (< addr #x3f00)
          (prog1
              (ppu-buffer ppu)
            (setf (ppu-buffer ppu) result))
          result)))
  
  ;;;; Misc Helpers
  
  (defun get-bg-pixel (ppu x)
    (let* ((x (+ (getf (ppu-meta ppu) :x) x))
           (y (+ (getf (ppu-meta ppu) :y) (ppu-scanline ppu)))
           (base (nametable-addr (round x 8) (round y 8))) ; TODO: Use floor instead?
           (tile (read-vram ppu (apply '+ (* 32 (first base)) (rest base))))
           (color (get-pixel-color ppu 'foo tile (mod x 8) (mod y 8))))
      (if (zerop color)
          nil
          (let* ((group (+ (* (round (first base) 4) 8)
                           (round (second base) 4)))
                 (attrib (read-vram ppu (apply #'+ #x03c0 group base)))
                 (attr-color (cond ((and (< (mod (second base) 4) 2)
                                         (< (mod (first base) 4) 2)) attrib)
                                   ((< (mod (first base) 4) 2) (ash attrib -2))
                                   ((< (mod (second base) 4) 2) (ash attrib -4))
                                   (t (ash attrib -6))))
                 (tile-color (logior (ash (logand attr-color #x03) 2) color))
                 (palette-index (logand (read-vram ppu (+ #x3f00 tile-color)) #x3f)))
            (get-color palette-index)))))
  
  (defun get-sprite-pixel (ppu x opaque-p)
    ;; get-sprite-pixel needs to return nil if every visible-sprite is nil,
  
negative.code: 
  ;;;; Colors
  
  (declaim (inline get-color put-pixel))
  (defmethod get-color ((ppu ppu) vram-index)
    (let* ((color-index (logand (read-vram ppu vram-index) #x3f))
           (base (* color-index 3))
           (red   (aref *color-palette* (+ 2 base)))
           (green (aref *color-palette* (+ 1 base)))
           (blue  (aref *color-palette* (+ 0 base))))
  