         @tempXScroll = 0    #  3-bit
 
     resetVariables: ->
-        @scanline = -1         # Total 262 scanlines (0..261)
-        @cycle = 0             # Total 341 cycles per scanline (0..340)
-        @renderedSprite = null # Currently rendered sprite
-        @delayedNMI = false    # Generate NMI after next instruction when its enabled (from 0 to 1) during VBLANK
+        @scanline = -1          # Total 262 scanlines (0..261)
+        @cycle = 0              # Total 341 cycles per scanline (0..340)
+        @renderedSprite = null  # Currently rendered sprite
+        @delayedNMI = false     # Whether to generate NMI after next instruction
+        @suppressVBlank = false # Whether to supress VBLANK flag setting and NMI generation during VBLANK
 
     setNTSCMode: (ntscMode) ->
         @ntscMode = ntscMode


    readStatus: ->
        value = @getStatus()
        @vblankStarted = 0
        @writeToogle = 0
        value

    getStatus: ->
        @vramWritesIgnored     << 4 | # S[4]
        @spriteScalineOverflow << 5 | # S[5]
        @spriteZeroHit         << 6 | # S[6]
        @vblankStarted         << 7   # S[7]

    setStatus: (value) ->
        @vramWritesIgnored     = (value >>> 4) & 1 # S[4]
        @spriteScalineOverflow = (value >>> 5) & 1 # S[5]
        @spriteZeroHit         = (value >>> 6) & 1 # S[6]
        @vblankStarted         = (value >>> 7)     # S[7]

    ###########################################################
    # Object attribute memory access

                @leaveVBlank()

    enterVBlank: ->
        unless @suppressVBlank
            @vblankFlag = 1
            @cpu.activateInterrupt Interrupt.NMI if @nmiEnabled
        @vblankActive = 1
        @frameAvailable = true

    leaveVBlank: ->
        @vblankFlag = 0
        @vblankActive = 0
        @spriteZeroHit = 0
        @suppressVBlank = false

    generateDelayedNMI: ->
        @cpu.activateInterrupt Interrupt.NMI
