anchor.diff:  
   (defgeneric render-scanline (ppu)
     (:method ((ppu ppu)) ;; TODO: Mirroring. Scrolling?
  -    (let* ((bd-index (logand (read-vram ppu #x3f00) #x3f))
  -           (bd-color (get-color bd-index)))
  +    (let ((bd-color (get-color ppu #x3f00)))
         (dotimes (x +width+)
           (let* ((bg-color (when (show-bg ppu)
                              (get-bg-pixel ppu x)))
  
positive.code:                      (y (- (ppu-scanline ppu) (sprite-y sprite))))
                   (when (flip-h sprite) (setf x (- 7 x)))
                   (when (flip-v sprite) (setf y (- 7 y)))
                   (setf pattern-color (get-pixel-color ppu :sprite tile x y))))
                (list
                 (error "8x16 sprite rendering unimplemented!")))
              (unless (zerop pattern-color)
                (return nil))
              (when (and (zerop i) opaque-p)
                (set-sprite-zero-hit ppu 1))
              (let* ((tile-color (logior (ash (palette sprite) 2) pattern-color))
                     (palette-index (logand (+ #x3f00 tile-color) #x3f)))
                (return (get-color (read-vram ppu palette-index))))))))
  
  (defun on-top (x y)
    (declare (ignore x)) ; TODO: determine sprite priority
    y)
  
  ;;;; Core
  
  (defun get-byte-ppu% (addr)
    (let ((ppu (nes-ppu *nes*)))
  
negative.code:                  :attribute  (read-oam ppu (+ 2 base))
                   :x          (read-oam ppu (+ 3 base)))))
  
  (defmethod get-attrib ((ppu ppu) base x y)
    (flet ((magic (x y) ; TODO: Why? Rename after enlightenment.
             (+ (* (round y 4) 8)
                (round x 4))))
      (let ((left (< (mod x 4) 2))
            (top (< (mod y 4) 2))
            (attr-byte (read-vram ppu (+ base (magic x y) #x3c0))))
        (cond ((and left top) (logand attr-byte #x03))
              (top (logand (ash attr-byte -2) #x03))
              (left (logand (ash attr-byte -4) #x03))
              (t (logand (ash attr-byte -6) #x03))))))
  
  (defmethod get-visible-sprites ((ppu ppu))
    (loop with count = 0 with result = (make-list 8 :initial-element nil)
       for i from 0 to 63 for sprite = (get-sprite ppu i)
       when (on-scanline sprite ppu)
       do (if (< count 8)
              (setf (nth count result) i
                    count (1+ count))
              (progn
                (set-sprite-overflow ppu 1)
                (return result)))
       finally (return result)))
  
  (defmethod get-bg-pixel ((ppu ppu) x)
    (let* ((x (+ (getf (ppu-meta ppu) :x) x))
           (y (+ (getf (ppu-meta ppu) :y) (ppu-scanline ppu))))
      (destructuring-bind (base x-index y-index) (nametable-addr (round x 8) (round y 8))
        (let* ((tile (read-vram ppu (+ (* 32 y-index) x-index base)))
               (color (get-pattern-color ppu :bg tile (mod x 8) (mod y 8))))
          (if (zerop color)
              nil
              (let* ((attr-color (get-attrib ppu base x-index y-index))
                     (tile-color (logior (ash attr-color 2) color)))
                (get-color ppu (+ #x3f00 tile-color))))))))
  
  (defun get-sprite-pixel (ppu x opaque-p)
    ;; get-sprite-pixel needs to return nil if every visible-sprite is nil,
  