                 @leaveVBlank()
 
     enterVBlank: ->
-        @vblankStarted = 1
+        unless @suppressVBlank
+            @vblankFlag = 1
+            @cpu.activateInterrupt Interrupt.NMI if @nmiEnabled
         @vblankActive = 1
         @frameAvailable = true
-        @cpu.activateInterrupt Interrupt.NMI if @nmiEnabled
 
     leaveVBlank: ->
-        @vblankStarted = 0
+        @vblankFlag = 0
         @vblankActive = 0
         @spriteZeroHit = 0
+        @suppressVBlank = false
 
     generateDelayedNMI: ->
         @cpu.activateInterrupt Interrupt.NMI

        @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

    setNTSCMode: (ntscMode) ->
        @ntscMode = ntscMode

        nmiEnabledOld = @nmiEnabled
        @setControl value
        @tempAddress = (@tempAddress & 0xF3FF) | (value & 0x03) << 10 # T[11,10] = C[1,0]
        @delayedNMI = true if @vblankFlag and not nmiEnabledOld and @nmiEnabled # Generate NMI after next instruction when its enabled (from 0 to 1) during VBLANK
        value

    setControl: (value) ->
