 cycleFlagsTable[338]    |= F_SKIP
 scanlineFlagsTable[261] |= F_SKIP
 
+class Sprite
+
+    constructor: ->
+        @address = 0
+        @height = 0
+        @rowNumber = 0
+        @x = 0
+        @horizontalFlip = false
+        @paletteNumber = 0
+        @inFront = false
+        @zeroSprite = false
+        @patternRow0 = 0
+        @patternRow1 = 0
+
 ###########################################################
 # Picture processing unit
 ###########################################################

            @sprite.inFront = (attributes & 0x20) is 0
            @sprite.zeroSprite = address is 0
            @sprite.patternRow0 = @ppuMemory.read @addressBus

    fetchSpriteHigh: ->
        @addressBus += 8
        if @sprite
            @sprite.patternRow1 = @ppuMemory.read @addressBus
            @spriteNumber++



    resetOAM: ->
        @primaryOAM = (0 for [0..0x100])  # 256B
        @secondaryOAM = (new Sprite for [0..7])
        @spriteCount = 0
        @spriteNumber = 0

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