         @cycle = 0
         @scanline++
         @incrementFrame() if @scanline > 261
+        @prerenderSprites() if 0 <= @scanline <= 239
 
     incrementFrame: ->
         @scanline = 0

    renderFramePixel: ->
        @renderedSprite = null
        backgroundColor = @renderBackgroundPixel()
        spriteColor = @renderSpritePixel()
        if (spriteColor & 0x03) and (backgroundColor & 0x03)
            @spriteZeroHit ||= @renderedSprite.zeroSprite                    # Both bagckground and sprite pixels are visible
            if @renderedSprite.inFront then spriteColor else backgroundColor # Choose target by rendering priority

        @secondaryOAM = (new Sprite for [0..7])
        @spriteCount = 0
        @spriteNumber = 0
        @spriteScanline = (0 for [0..261])
        @spriteScanlinePixels = (null for [0..261])

    resetRegisters: ->
        @setControl 0       #  8-bit PPUCTRL register
